Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp397844pxj; Tue, 18 May 2021 06:01:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtMqcU+rUTzvFF3kkg1gmBCa8tp/M2Zf4ke7srbir9QClAGlOMoQgeRXKfqDKFeH37XlJo X-Received: by 2002:a17:906:2e82:: with SMTP id o2mr6076006eji.388.1621342903042; Tue, 18 May 2021 06:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621342903; cv=none; d=google.com; s=arc-20160816; b=caW/kxm9Vnl4E1S9xzaA1/4wkyoE91MA6BaQ/W2klpO9977liaBUpspXGyn28ONj2N 7PY8rYrBfA3FoAXUaCUebakGd/XRMpEsi/6R8mS5bhrRF009C6YivZoTFUNYrY9pERT5 guOnv8d72aPcqJTR7KDhgS9uLeCwNkp426sEeFoH2c8pMEV1GeM+Q3PITTcpeL7l7cxl 1aK1inhf6BeTrhgPCj07Z1q0uK7H+X4cr6D7ljxwSTwYnycngkPT0K/Tq4RjXeRHgqOz ZbnC4Xm27XNjafbyfnzQRUqK5rks6fANEMJXUf6WeqlIs/3Z4ksHSf7B27Sh8rgax8LD 7RRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M9hmBPk9vD70pfjUCEaxSXrul2SSXBg9NH4BjufKDT0=; b=Fw8JRfq8OfEpTuhxzoVQvztZEe/xPHIfdk4cCxrCePEP8E2k5T+Wh+jznab4ykg3Zp /zc+q+NRV+k5KT7Xu01wmW87aTbHc/NYcCSdBeTmZn91xdXrzNPPOIqf+tBnjGAyWIHh 114zjmxGsadwOXhub25CmMr85/t9mLD8oKTVjTpH7MYrmPuxWEyLJTdLbE8YWmOVjtSe F8teFp8ugiURFEXqNlmOZyRx7mWUnW7EnEWiKSgKxNQXecYxGSNsIzuWWYVFKjHbVxvk cpn3XUKPl0ikl16vUxmeVT3ghCSj01nKDcCqhOBm6rVSTOzYVPXVSuwyTpwEF4VwUF90 cP+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gEtaP6yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l21si8519274ejn.568.2021.05.18.06.00.54; Tue, 18 May 2021 06:01:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gEtaP6yd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239930AbhEQPfL (ORCPT + 99 others); Mon, 17 May 2021 11:35:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:54842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244348AbhEQPUR (ORCPT ); Mon, 17 May 2021 11:20:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC0A3613DB; Mon, 17 May 2021 14:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262050; bh=Bd27FTLLPS9PaoiW4XggeiQQjUdXygHDGB8ss44Di7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gEtaP6ydGcBmRoctI63U0YozQE6a2A8uWvAIOsNZFUhafZJrIOlxdr1rWvzr6clAV yu3PpbQ+AXPLH1vXS2aCexBxouFgKIkreyKr3WVlb3IM3lK96VM4vxUJWvLc7gJFWL l+p4RPiSoedQccsjoc4KOOJmUZuhvd00mY3gLYzs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhen Lei , Wang Nan , Will Deacon , Russell King , Sasha Levin Subject: [PATCH 5.10 104/289] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Mon, 17 May 2021 16:00:29 +0200 Message-Id: <20210517140308.682856289@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhen Lei [ Upstream commit a506bd5756290821a4314f502b4bafc2afcf5260 ] The commit 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") set a default event->overflow_handler in perf_event_alloc(), and replace the check event->overflow_handler with is_default_overflow_handler(), but one is missing. Currently, the bp->overflow_handler can not be NULL. As a result, enable_single_step() is always not invoked. Comments from Zhen Lei: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210207105934.2001-1-thunder.leizhen@huawei.com/ Fixes: 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") Signed-off-by: Zhen Lei Cc: Wang Nan Acked-by: Will Deacon Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 08660ae9dcbc..b1423fb130ea 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -886,7 +886,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs) info->trigger = addr; pr_debug("breakpoint fired: address = 0x%x\n", addr); perf_bp_event(bp, regs); - if (!bp->overflow_handler) + if (is_default_overflow_handler(bp)) enable_single_step(bp, addr); goto unlock; } -- 2.30.2