Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: ptrace: Fix missing return in hw breakpoint code

When delivering a hw-breakpoint SIGTRAP to a compat task via ptrace, the
lack of a 'return' statement means we fallthrough to the native case,
which differs in its handling of 'si_errno'.

Although this looks to be harmless because the subsequent signal is
effectively ignored, it's confusing and unintentional, so add the
missing 'return'.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Link: https://lore.kernel.org/r/20210202002109.GA624440@juliacomputing.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Keno Fischer and committed by
Will Deacon
12fc4288 e30be145

+1
+1
arch/arm64/kernel/ptrace.c
··· 194 194 } 195 195 arm64_force_sig_ptrace_errno_trap(si_errno, bkpt->trigger, 196 196 desc); 197 + return; 197 198 } 198 199 #endif 199 200 arm64_force_sig_fault(SIGTRAP, TRAP_HWBKPT, bkpt->trigger, desc);