mirror of https://github.com/OpenIPC/firmware.git
22 lines
669 B
Diff
22 lines
669 B
Diff
diff -drupN a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c
|
|
--- a/arch/arm/kernel/kgdb.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/arch/arm/kernel/kgdb.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -140,6 +140,8 @@ int kgdb_arch_handle_exception(int excep
|
|
|
|
static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
|
|
{
|
|
+ if (user_mode(regs))
|
|
+ return -1;
|
|
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
|
|
|
return 0;
|
|
@@ -147,6 +149,8 @@ static int kgdb_brk_fn(struct pt_regs *r
|
|
|
|
static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
|
|
{
|
|
+ if (user_mode(regs))
|
|
+ return -1;
|
|
compiled_break = 1;
|
|
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
|
|