From patchwork Mon May 17 14:00:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 440126 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1186562jac; Mon, 17 May 2021 08:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuG4v6Eg0YjeAaE4bdV/8Fvf1FovlcI0DtRanQEWPwMzbiBJFkHL+owrzElZZMkKuoWxN6 X-Received: by 2002:a17:906:5a83:: with SMTP id l3mr486165ejq.50.1621264966579; Mon, 17 May 2021 08:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621264966; cv=none; d=google.com; s=arc-20160816; b=t+AE14WOLeywpedXggMjRFpb8DgV+M/cPmKcC9rJahkyZmeipN0adr8uvZ8zZd2fDy G+rTRvbtvTjf0Q2kr3uRZDzViHJqmBrlAlvcGxIlEIVUq5BtSUK9vp29ulGVHKmYZ9/N hI1XORvsRT+QyOnBmzkzJQ117HPul9JiyVh06QUW/wOeMQgHrok1p0O88UH3GMpR7Q3X iP7QTbJZPCJ73VZLwLkc98RY9EKl2j1vCtor5FLrV8hcnvypbUGyuO9OOLtaYPhaLrsV /KTDgCcxwus2/a/JC2GCN91P3/h1Skz+NfOhjE4b3EpjjxlF+XhcRisohJwQ6i7bbAoj xBxg== 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=VzryeS37qqs4YQuscBZv8QrveGZM/LkKu0AxbmHft727dtaXISQwaJuNJPDTedXmVw DW1swvGxvQAlZ8+h75iiLRFr/KXPF/foLqfZJNlfe8DN/3fhXqihpqhshk6nqe2fv2yg LU3VhQp+PcwdfNm4fr/ZhBYiEKbeoHLXnZ867FPpmx9vIaAlcmwNPbFfT+pu0Ai90Gji HoKnCeY/2+0mlxwm2zJRZef/irRWIG+hq/JqPPMMoMnES/LzueN+Pi0dZIpGtmN9VZJF 6l6LyVOQg4MxU22hINyw+sanAQLBNMTdrVubuZaGd0M/pOS6pDzwT0Q3PRpt1jg8AzSV Lg/Q== 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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 kt7si4868543ejb.630.2021.05.17.08.22.46; Mon, 17 May 2021 08:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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 stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S238784AbhEQPX6 (ORCPT + 12 others); Mon, 17 May 2021 11:23:58 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 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; }