Skip to content

Commit ef2544f

Browse files
amlutosuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/c56de3d103f40e6304437b150aa7b215530d23f7.1612924255.git.luto@kernel.org
1 parent f42a40f commit ef2544f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/x86/mm/fault.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,8 +1380,11 @@ void do_user_addr_fault(struct pt_regs *regs,
13801380
*/
13811381
fault = handle_mm_fault(vma, address, flags, regs);
13821382

1383-
/* Quick path to respond to signals */
13841383
if (fault_signal_pending(fault, regs)) {
1384+
/*
1385+
* Quick path to respond to signals. The core mm code
1386+
* has unlocked the mm for us if we get here.
1387+
*/
13851388
if (!user_mode(regs))
13861389
no_context(regs, error_code, address, SIGBUS,
13871390
BUS_ADRERR);

0 commit comments

Comments
 (0)