]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - arch/x86/mm/fault.c
mmap locking API: convert mmap_sem comments
[thirdparty/linux.git] / arch / x86 / mm / fault.c
index c23bcd027ae1919fc9718c9e762cb5e26cead581..0b03ae8c39cdb2a9f1a431a658d5b58768fd325f 100644 (file)
@@ -865,7 +865,7 @@ bad_area_access_error(struct pt_regs *regs, unsigned long error_code,
                 * 2. T1   : set PKRU to deny access to pkey=4, touches page
                 * 3. T1   : faults...
                 * 4.    T2: mprotect_key(foo, PAGE_SIZE, pkey=5);
-                * 5. T1   : enters fault handler, takes mmap_sem, etc...
+                * 5. T1   : enters fault handler, takes mmap_lock, etc...
                 * 6. T1   : reaches here, sees vma_pkey(vma)=5, when we really
                 *           faulted on a pte with its pkey=4.
                 */
@@ -1231,12 +1231,12 @@ void do_user_addr_fault(struct pt_regs *regs,
         * Kernel-mode access to the user address space should only occur
         * on well-defined single instructions listed in the exception
         * tables.  But, an erroneous kernel fault occurring outside one of
-        * those areas which also holds mmap_sem might deadlock attempting
+        * those areas which also holds mmap_lock might deadlock attempting
         * to validate the fault against the address space.
         *
         * Only do the expensive exception table search when we might be at
         * risk of a deadlock.  This happens if we
-        * 1. Failed to acquire mmap_sem, and
+        * 1. Failed to acquire mmap_lock, and
         * 2. The access did not originate in userspace.
         */
        if (unlikely(!mmap_read_trylock(mm))) {
@@ -1289,9 +1289,9 @@ good_area:
         * If for any reason at all we couldn't handle the fault,
         * make sure we exit gracefully rather than endlessly redo
         * the fault.  Since we never set FAULT_FLAG_RETRY_NOWAIT, if
-        * we get VM_FAULT_RETRY back, the mmap_sem has been unlocked.
+        * we get VM_FAULT_RETRY back, the mmap_lock has been unlocked.
         *
-        * Note that handle_userfault() may also release and reacquire mmap_sem
+        * Note that handle_userfault() may also release and reacquire mmap_lock
         * (and not return with VM_FAULT_RETRY), when returning to userland to
         * repeat the page fault later with a VM_FAULT_NOPAGE retval
         * (potentially after handling any pending signal during the return to
@@ -1310,7 +1310,7 @@ good_area:
        }
 
        /*
-        * If we need to retry the mmap_sem has already been released,
+        * If we need to retry the mmap_lock has already been released,
         * and if there is a fatal signal pending there is no guarantee
         * that we made any progress. Handle this case first.
         */