aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPratyush Anand <panand@redhat.com>2015-01-13 14:20:55 +0530
committerSteve Capper <steve.capper@linaro.org>2015-01-27 16:46:19 +0000
commitd7ae3126cd7d4f476f64ba3b68d0761bc3ba1266 (patch)
treecc549fa8e063b3846df011754cbbc725286d7954 /arch
parent8a0e34370c8ee5191630f51ba6b0ce1ab6ba1031 (diff)
downloadlinux-d7ae3126cd7d4f476f64ba3b68d0761bc3ba1266.tar.gz
ARM64: fix kgdb_step_brk_fn to ignore other's exception
ARM64 step exception does not have any syndrome information. So, it is responsibility of exception handler to take care that they handle it only if exception was raised for them. After kprobe support, both kprobe and kgdb uses register_step_hook mechanism to register its step handler. So, if call_step_hook calls kgdb handler first, it was always returning 0 and in that case if an exception was raised for kprobe, it would never be handled. Signed-off-by: Pratyush Anand <panand@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/kernel/kgdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c
index a0d10c55f30..9469465a5e0 100644
--- a/arch/arm64/kernel/kgdb.c
+++ b/arch/arm64/kernel/kgdb.c
@@ -229,6 +229,9 @@ static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr)
static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
{
+ if (!kgdb_single_step)
+ return DBG_HOOK_ERROR;
+
kgdb_handle_exception(1, SIGTRAP, 0, regs);
return 0;
}