[RFC PATCH 20/24] x86 fault handler: extend range locking to supported file vmas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the fault handler to operate with a fine grained range lock when
operating on any of the explicitly supported file types.

Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx>
---
 arch/x86/mm/fault.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git arch/x86/mm/fault.c arch/x86/mm/fault.c
index 1e37284d373c..ca30952896e1 100644
--- arch/x86/mm/fault.c
+++ arch/x86/mm/fault.c
@@ -1456,9 +1456,9 @@ void do_user_addr_fault(struct pt_regs *regs,
 
 		/*
 		 * Fall back to locking the entire MM
-		 * when operating on file vma.
+		 * when the vm_ops do not support fine grained range locking.
 		 */
-		if (!vma_is_anonymous(vma)) {
+		if (!vma_is_anonymous(vma) && !vma->vm_ops->fine_grained) {
 			mm_read_range_unlock(mm, range);
 			range = mm_coarse_lock_range();
 			goto retry;
-- 
2.25.0.341.g760bfbb309-goog





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux