Commit d4ad442
arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region
commit 72f310481a08db821b614e7b5d00febcc9064b36 upstream.
We don't hold the mmap_sem while searching for VMAs (via find_vma), in
kvm_arch_prepare_memory_region, which can end up in expected failures.
Fixes: commit 8eef912 ("arm/arm64: KVM: map MMIO regions at creation time")
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Eric Auger <eric.auger@rehat.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
[ Handle dirty page logging failure case ]
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8e88806 commit d4ad442
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1761 | 1761 | | |
1762 | 1762 | | |
1763 | 1763 | | |
| 1764 | + | |
1764 | 1765 | | |
1765 | 1766 | | |
1766 | 1767 | | |
| |||
1804 | 1805 | | |
1805 | 1806 | | |
1806 | 1807 | | |
1807 | | - | |
1808 | | - | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1809 | 1812 | | |
1810 | 1813 | | |
1811 | 1814 | | |
| |||
1817 | 1820 | | |
1818 | 1821 | | |
1819 | 1822 | | |
1820 | | - | |
| 1823 | + | |
1821 | 1824 | | |
1822 | 1825 | | |
1823 | 1826 | | |
1824 | 1827 | | |
1825 | 1828 | | |
1826 | 1829 | | |
1827 | 1830 | | |
| 1831 | + | |
| 1832 | + | |
1828 | 1833 | | |
1829 | 1834 | | |
1830 | 1835 | | |
| |||
0 commit comments