aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel/kgdb.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-03-18 09:50:49 +0000
committerMark Brown <broonie@kernel.org>2016-03-18 09:50:49 +0000
commit0f221533bae04ea913dc8ebe18cb876a916ff690 (patch)
tree77e668f0080e2ca245bd6150f5046370e8fa9f4b /arch/arm/kernel/kgdb.c
parent917a9133a6b3c6cc2b6b5649d28c617a4ccac3e6 (diff)
parent127f7fb4c452328fa24f4c29eb403a97c5f7ea8c (diff)
Merge remote-tracking branch 'lsk/linux-linaro-lsk-v4.4-android' into linux-linaro-lsk-v4.4-androidlsk-v4.4-16.03-android
Diffstat (limited to 'arch/arm/kernel/kgdb.c')
-rw-r--r--arch/arm/kernel/kgdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c
index 9232caee7060..f3c662299531 100644
--- a/arch/arm/kernel/kgdb.c
+++ b/arch/arm/kernel/kgdb.c
@@ -140,6 +140,8 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
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 *regs, unsigned int instr)
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);