From 9d90a90855ceb9ce0fb9b46b0591ac211e4b4612 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Tue, 4 Jan 2022 21:34:26 +0000 Subject: parisc: Don't call faulthandler_disabled() in do_page_fault() 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(). Signed-off-by: John David Anglin Signed-off-by: Helge Deller --- arch/parisc/mm/fault.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch/parisc') 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) -- cgit