* [PATCH] parisc: Don't call faulthandler_disabled() in do_page_fault()
@ 2022-01-04 21:34 John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2022-01-04 21:34 UTC (permalink / raw)
To: linux-parisc; +Cc: Helge Deller, Deller, James Bottomley
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
It is dangerous to call faulthandler_disabled() when user_mode(regs)
is true. The task pagefault_disabled counter is racy and it is not
updated atomically on parisc. As a result, calling faulthandler_disabled()
may cause erroneous termination.
We now handle execption fixups and termination when user_mode(regs) is
false in handle_interruption(). Thus, we can just remove the
faulthandler_disabled() check from do_page_fault().
faulthandler_disabled()
Signed-off-by: John David Anglin <dave.anglin@bell.net>
---
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c
index 01fd2a32acc6..499e2e8f7f34 100644
--- a/arch/parisc/mm/fault.c
+++ b/arch/parisc/mm/fault.c
@@ -267,9 +267,6 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
vm_fault_t fault = 0;
unsigned int flags;
- if (faulthandler_disabled())
- goto no_context;
-
tsk = current;
mm = tsk->mm;
if (!mm)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-04 21:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 21:34 [PATCH] parisc: Don't call faulthandler_disabled() in do_page_fault() John David Anglin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.