projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
arch
/
arm
/
kernel
/
kgdb.c
diff --git
a/arch/arm/kernel/kgdb.c
b/arch/arm/kernel/kgdb.c
index 778c2f7024ff57304227ce67665e749f39b05fc7..b321c8fbb87dc8d68b60712c6f74c5d306ca8777 100644
(file)
--- a/
arch/arm/kernel/kgdb.c
+++ b/
arch/arm/kernel/kgdb.c
@@
-144,6
+144,8
@@
int kgdb_arch_handle_exception(int exception_vector, int signo,
static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
{
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;
kgdb_handle_exception(1, SIGTRAP, 0, regs);
return 0;
@@
-151,6
+153,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)
{
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);
compiled_break = 1;
kgdb_handle_exception(1, SIGTRAP, 0, regs);