diff options
author | Helge Deller <deller@gmx.de> | 2023-05-24 14:34:58 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-05-24 15:46:12 +0200 |
commit | 6888ff04e37d01295620a73f3f7efbc79f6ef152 (patch) | |
tree | f05b8e90b3b040abfc8a0ce024a1f6b5e5a2f2fa /arch | |
parent | parisc: Handle kprobes breakpoints only in kernel context (diff) | |
download | linux-6888ff04e37d01295620a73f3f7efbc79f6ef152.tar.xz linux-6888ff04e37d01295620a73f3f7efbc79f6ef152.zip |
parisc: Handle kgdb breakpoints only in kernel context
The kernel kgdb break instructions should only be handled when running
in kernel context.
Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/traps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 4d5f7b167a65..304eebd1c83e 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c @@ -306,8 +306,8 @@ static void handle_break(struct pt_regs *regs) #endif #ifdef CONFIG_KGDB - if (unlikely(iir == PARISC_KGDB_COMPILED_BREAK_INSN || - iir == PARISC_KGDB_BREAK_INSN)) { + if (unlikely((iir == PARISC_KGDB_COMPILED_BREAK_INSN || + iir == PARISC_KGDB_BREAK_INSN)) && !user_mode(regs)) { kgdb_handle_exception(9, SIGTRAP, 0, regs); return; } |