[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174085960856.10177.3015043471401493148.tip-bot2@tip-bot2>
Date: Sat, 01 Mar 2025 20:06:46 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: locking/core] lockdep/mm: Fix might_fault() lockdep check of
current->mm->mmap_lock
The following commit has been merged into the locking/core branch of tip:
Commit-ID: a1b65f3f7c6f7f0a08a7dba8be458c6415236487
Gitweb: https://git.kernel.org/tip/a1b65f3f7c6f7f0a08a7dba8be458c6415236487
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Mon, 04 Nov 2024 14:39:10 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Sat, 01 Mar 2025 19:32:41 +01:00
lockdep/mm: Fix might_fault() lockdep check of current->mm->mmap_lock
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@...radead.org>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Link: https://lore.kernel.org/r/20241104135517.536628371@infradead.org
---
mm/memory.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 539c0f7..1dfad45 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6835,10 +6835,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
Powered by blists - more mailing lists