[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161297915599.23325.15354587585841772499.tip-bot2@tip-bot2>
Date: Wed, 10 Feb 2021 17:45:55 -0000
From: "tip-bot2 for Andy Lutomirski" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Andy Lutomirski <luto@...nel.org>, Borislav Petkov <bp@...e.de>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/mm] x86/fault: Document the locking in the
fault_signal_pending() path
The following commit has been merged into the x86/mm branch of tip:
Commit-ID: ef2544fb3f6457b79fc73cea39dafd67ee0f2824
Gitweb: https://git.kernel.org/tip/ef2544fb3f6457b79fc73cea39dafd67ee0f2824
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Tue, 09 Feb 2021 18:33:37 -08:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Wed, 10 Feb 2021 14:12:07 +01:00
x86/fault: Document the locking in the fault_signal_pending() path
If fault_signal_pending() returns true, then the core mm has unlocked the
mm for us. Add a comment to help future readers of this code.
Signed-off-by: Andy Lutomirski <luto@...nel.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/c56de3d103f40e6304437b150aa7b215530d23f7.1612924255.git.luto@kernel.org
---
arch/x86/mm/fault.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 3ffed00..013910b 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -1380,8 +1380,11 @@ good_area:
*/
fault = handle_mm_fault(vma, address, flags, regs);
- /* Quick path to respond to signals */
if (fault_signal_pending(fault, regs)) {
+ /*
+ * Quick path to respond to signals. The core mm code
+ * has unlocked the mm for us if we get here.
+ */
if (!user_mode(regs))
no_context(regs, error_code, address, SIGBUS,
BUS_ADRERR);
Powered by blists - more mailing lists