From patchwork Thu May 20 09:21:46 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: 443199 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp2140411jac; Thu, 20 May 2021 03:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaQTC8PU+UPpWOYFf3eC9grZYXrRLw2hRSBA3ES4o7Op47+G8IGQ8Iz3KddZGL329jrZCd X-Received: by 2002:aa7:cc19:: with SMTP id q25mr4113672edt.56.1621505263177; Thu, 20 May 2021 03:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621505263; cv=none; d=google.com; s=arc-20160816; b=PWCrSaV8QvHFfKa+nnw08so4aHeVmrc5jcuqJ5CuU4jbmAUuQcEL/KJ9r4yVUhkOxf 4P9jZByIHN7+MvdKKTrpV6Py3DK8FxqAHzo68Hr0RdI3q2HMwKR0+Ol54aytosRIvizI IJ1BAW2U4WaZBg8y0BnBDlntWrPRvp6uPKR3t/QV0WxQh4XzyUMzTYyXtY5FGxfTcN1G 0cmW5TxY5aMeDs98nNMcR/Trww0GQdpa9+gDOfDW++XqNPN5hKO1yuph8ALSXqxxJexG J+4d1SE5UpRyvfgPsdP8AaAX/9S38Kmok2YDwRMGPyL9gzu9DJfmA1lV59VsNTh/WSXX BSjw== 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=BEEDfiBKtMfzg7TTNqLbBdsvZhIaAbCHKN4jpGCZ9bg=; b=jyhKe3hkJ90FIZDPpj5xx4Ltu6yNb/2xfrq1ZOBqY7pjfqpjrjnCBEJhVzBEUMoF+w 74tT74URQX+CH1YvVOIQ2OOyIob7oBLyvXAbXa4EI2Uc7u7cZ/K1/eENfCwV8UOgqr+l Gr7hxZQmf8urw4y0o1bBH+kna1VXJJUsT4v1U43P1J1AIjPRXbTzWmuX4cIsh++ApZa7 N2GiTPINmYkjVje5c5JHIo5K9Egdy3VxDcMKjZNYxItwArn4vnV2L9oLtFbMvjSCGgUa orsBlqoKeoQc2JLm+JkMXmbohqIWJj2yL+8cZP5kvtAv8jJT+ZVNi7KA/MQ7mnSmTnSz SLsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DVxWBWmn; 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 da12si1856574edb.130.2021.05.20.03.07.42; Thu, 20 May 2021 03:07:43 -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=DVxWBWmn; 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 S235537AbhETKJA (ORCPT + 12 others); Thu, 20 May 2021 06:09:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:38552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234851AbhETKHC (ORCPT ); Thu, 20 May 2021 06:07:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD600613D1; Thu, 20 May 2021 09:41:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503692; bh=enFRvPdbEqOAKYJl8DIel3Uv8hX4lNMZ/bkda9tmp1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVxWBWmnbnRUUv8JQth10yNrdRcfo2VoqINdX6VOsryjnj4GTF+rnEXRubfTaPrXT +PzlNvi9LWEH0DTjTJ6eaptWO4XRA48Nlpxuk7itAgRoNAGRVT4Aitwxc2flo3Y+dS hI5BNGTx0C+5knngS6LVjuwSabcb5zp+45I9rbbU= 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 4.19 337/425] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Thu, 20 May 2021 11:21:46 +0200 Message-Id: <20210520092142.489260378@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 97fa9c167757..2ee5b7f5e7ad 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -891,7 +891,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; }