linux/arch/parisc/kernel
John David Anglin 3681e9f3f0 parisc: Avoid calling faulthandler_disabled() twice
[ Upstream commit 9e9d4b460f ]

In handle_interruption(), we call faulthandler_disabled() to check whether the
fault handler is not disabled. If the fault handler is disabled, we immediately
call do_page_fault(). It then calls faulthandler_disabled(). If disabled,
do_page_fault() attempts to fixup the exception by jumping to no_context:

no_context:

        if (!user_mode(regs) && fixup_exception(regs)) {
                return;
        }

        parisc_terminate("Bad Address (null pointer deref?)", regs, code, address);

Apart from the error messages, the two blocks of code perform the same
function.

We can avoid two calls to faulthandler_disabled() by a simple revision
to the code in handle_interruption().

Note: I didn't try to fix the formatting of this code block.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 10:54:20 +01:00
..
syscalls parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage 2020-10-23 20:14:07 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
alternative.c parisc: Refactor alternative code to accept multiple conditions 2020-04-05 22:50:40 +02:00
asm-offsets.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
audit.c
cache.c parisc: Rewrite tlb flush threshold calculation 2020-10-15 08:10:39 +02:00
compat_audit.c
drivers.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
entry.S parisc/entry: fix trace test in syscall exit path 2021-11-21 13:46:36 +01:00
firmware.c parisc: firmware: Update references to parisc website 2020-06-01 23:02:11 +02:00
ftrace.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
hardware.c parisc: hardware: Update references to parisc website 2020-06-01 23:02:39 +02:00
head.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
hpmc.S
inventory.c parisc: Add qemu fw_cfg interface 2020-10-15 08:10:37 +02:00
irq.c parisc: Bump 64-bit IRQ stack size to 64 KB 2021-03-07 12:34:13 +01:00
jump_label.c
kexec_file.c
kexec.c
kgdb.c maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
kprobes.c parisc: kprobes: Use generic kretprobe trampoline handler 2020-09-08 11:52:33 +02:00
Makefile parisc: fix compilation when KEXEC=n and KEXEC_FILE=y 2019-12-15 21:05:38 +01:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pa7300lc.c
pacache.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
parisc_ksyms.c Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-09-03 10:09:31 +02:00
patch.c
pci-dma.c dma-mapping: merge <linux/dma-noncoherent.h> into <linux/dma-map-ops.h> 2020-10-06 07:07:06 +02:00
pci.c
pdc_chassis.c
pdc_cons.c
pdt.c parisc: Report bad pages as HardwareCorrupted 2020-07-28 11:19:17 +02:00
perf_asm.S
perf_images.h
perf.c parisc/perf: open access for CAP_PERFMON privileged process 2020-04-16 12:19:08 -03:00
process.c sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
processor.c parisc: Replace cpu_up/down() with add/remove_cpu() 2020-03-25 12:59:36 +01:00
ptrace.c parisc: switch to ->regset_get() 2020-07-27 14:31:12 -04:00
real2.S
relocate_kernel.S
setup.c arch/parisc/setup: Drop dummy_con initialization 2020-01-14 15:29:17 +01:00
signal.c parisc: fix crash with signals and alloca 2021-09-18 13:40:35 +02:00
signal32.c
signal32.h
smp.c parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling 2021-11-18 14:04:01 +01:00
stacktrace.c
sys_parisc.c parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage 2020-10-23 20:14:07 +02:00
sys_parisc32.c
syscall.S parisc: Correct completer in lws start 2021-12-29 12:26:02 +01:00
time.c parisc: Mark cr16 CPU clocksource unstable on all SMP machines 2021-12-08 09:03:29 +01:00
topology.c
traps.c parisc: Avoid calling faulthandler_disabled() twice 2022-01-27 10:54:20 +01:00
unaligned.c
unwind.c parisc/unwind: fix unwinder when CONFIG_64BIT is enabled 2021-11-18 14:04:01 +01:00
vmlinux.lds.S Revert "parisc: Fix backtrace to always include init funtion names" 2021-12-01 09:19:00 +01:00