diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2024-11-04 14:39:10 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-10 14:37:26 +0200 |
| commit | 913b739cd2bfcff88c9cc7b977596c4194a6dcee (patch) | |
| tree | f294573d0e32661e484a62d063cf1af5a7b619cb /mm/memory.c | |
| parent | 71fc439af51a104f1d4483656737134c2a771288 (diff) | |
| download | linux-913b739cd2bfcff88c9cc7b977596c4194a6dcee.tar.gz linux-913b739cd2bfcff88c9cc7b977596c4194a6dcee.tar.bz2 linux-913b739cd2bfcff88c9cc7b977596c4194a6dcee.zip | |
lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock
[ Upstream commit a1b65f3f7c6f7f0a08a7dba8be458c6415236487 ]
Turns out that this commit, about 10 years ago:
9ec23531fd48 ("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: 9ec23531fd48 ("sched/preempt, mm/fault: Trigger might_sleep() in might_fault() with disabled pagefaults")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/r/20241104135517.536628371@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'mm/memory.c')
| -rw-r--r-- | mm/memory.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 65f1865cb461..c39a45481c44 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5945,10 +5945,8 @@ void __might_fault(const char *file, int line) if (pagefault_disabled()) return; __might_sleep(file, line); -#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) if (current->mm) might_lock_read(¤t->mm->mmap_lock); -#endif } EXPORT_SYMBOL(__might_fault); #endif |
