Skip to content

Commit a1b65f3

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock
Turns out that this commit, about 10 years ago: 9ec2353 ("sched/preempt, mm/fault: Trigger might_sleep() in might_fault() with disabled pagefaults") ... accidentally (and unnessecarily) put the lockdep part of __might_fault() under CONFIG_DEBUG_ATOMIC_SLEEP=y. This is potentially notable because large distributions such as Ubuntu are running with !CONFIG_DEBUG_ATOMIC_SLEEP. Restore the debug check. [ mingo: Update changelog. ] Fixes: 9ec2353 ("sched/preempt, mm/fault: Trigger might_sleep() in might_fault() with disabled pagefaults") Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 023f329 commit a1b65f3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mm/memory.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6835,10 +6835,8 @@ void __might_fault(const char *file, int line)
68356835
if (pagefault_disabled())
68366836
return;
68376837
__might_sleep(file, line);
6838-
#if defined(CONFIG_DEBUG_ATOMIC_SLEEP)
68396838
if (current->mm)
68406839
might_lock_read(&current->mm->mmap_lock);
6841-
#endif
68426840
}
68436841
EXPORT_SYMBOL(__might_fault);
68446842
#endif

0 commit comments

Comments
 (0)