From: Keno Fischer Date: Tue, 2 Feb 2021 00:21:09 +0000 (-0500) Subject: arm64: ptrace: Fix missing return in hw breakpoint code X-Git-Tag: v5.15~1622^2~19^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12fc4288408a8799409f7fa62a526b60e92da334;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20210202002109.GA624440@juliacomputing.com Signed-off-by: Will Deacon --- diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 8ac487c..3d5c8af 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -194,6 +194,7 @@ static void ptrace_hbptriggered(struct perf_event *bp, } arm64_force_sig_ptrace_errno_trap(si_errno, bkpt->trigger, desc); + return; } #endif arm64_force_sig_fault(SIGTRAP, TRAP_HWBKPT, bkpt->trigger, desc);