diff options
author | Andy Lutomirski <luto@kernel.org> | 2021-02-09 18:33:37 -0800 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-02-10 14:12:07 +0100 |
commit | ef2544fb3f6457b79fc73cea39dafd67ee0f2824 (patch) | |
tree | 5c349fcd160f436085fedaeee430c1a3ea2cf9a1 /arch/x86/mm/fault.c | |
parent | f42a40fd53fb5c77bae67d917d66078dbaa46bc2 (diff) | |
download | lwn-ef2544fb3f6457b79fc73cea39dafd67ee0f2824.tar.gz lwn-ef2544fb3f6457b79fc73cea39dafd67ee0f2824.zip |
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@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/c56de3d103f40e6304437b150aa7b215530d23f7.1612924255.git.luto@kernel.org
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 3ffed003f281..013910b7b93f 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); |