Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43ffe982 authored by Helge Deller's avatar Helge Deller Committed by Greg Kroah-Hartman
Browse files

parisc: Handle kgdb breakpoints only in kernel context



commit 6888ff04e37d01295620a73f3f7efbc79f6ef152 upstream.

The kernel kgdb break instructions should only be handled when running
in kernel context.

Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7d19a36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -305,8 +305,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;
	}