Skip to content

Commit 6888ff0

Browse files
committed
parisc: Handle kgdb breakpoints only in kernel context
The kernel kgdb break instructions should only be handled when running in kernel context. Cc: <[email protected]> # v5.4+ Signed-off-by: Helge Deller <[email protected]>
1 parent df41949 commit 6888ff0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/parisc/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ static void handle_break(struct pt_regs *regs)
306306
#endif
307307

308308
#ifdef CONFIG_KGDB
309-
if (unlikely(iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
310-
iir == PARISC_KGDB_BREAK_INSN)) {
309+
if (unlikely((iir == PARISC_KGDB_COMPILED_BREAK_INSN ||
310+
iir == PARISC_KGDB_BREAK_INSN)) && !user_mode(regs)) {
311311
kgdb_handle_exception(9, SIGTRAP, 0, regs);
312312
return;
313313
}

0 commit comments

Comments
 (0)