diff options
author | Pratyush Anand <panand@redhat.com> | 2016-11-02 14:40:42 +0530 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-11-07 18:15:20 +0000 |
commit | b66c9870e9746038a532f87632bee8c0dcbeee3a (patch) | |
tree | 19639c8a968854ccde185941a09e33b810b8fd9e /arch | |
parent | c2249707ee53b5dd696f0fae8543a754684ea04a (diff) | |
download | linux-stable-b66c9870e9746038a532f87632bee8c0dcbeee3a.tar.gz linux-stable-b66c9870e9746038a532f87632bee8c0dcbeee3a.tar.bz2 linux-stable-b66c9870e9746038a532f87632bee8c0dcbeee3a.zip |
arm64: kgdb_step_brk_fn: 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.
Since kgdb_step_brk_fn() always returns 0, therefore we might have problem
when we will have other step handler registered as well.
This patch fixes kgdb_step_brk_fn() to return error in case of step handler
was not meant for kgdb.
Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kernel/kgdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index e017a9493b92..d217c9e95b06 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c @@ -247,6 +247,9 @@ NOKPROBE_SYMBOL(kgdb_compiled_brk_fn); 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; } |