From patchwork Thu May 20 09:23:06 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: 443221 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp2180375jac; Thu, 20 May 2021 04:04:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfnGhOFL8DoV9qglX1tuk2Upi2oucWrGdeBW/9pmIT3vgM6jXUODXk+4m+FUr9Z4HljThs X-Received: by 2002:a17:906:8690:: with SMTP id g16mr4066988ejx.315.1621508653874; Thu, 20 May 2021 04:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621508653; cv=none; d=google.com; s=arc-20160816; b=J/JASV47bWA74LZVFFKeL/3mSswRRa6E7a0+Jg4Fzzq/WmBG43pmH945VvvfwSAO5k mpR91kua6Pl+8GetxW3B989qLXxdRhryJhGNES6PAWeXEBl6oQil+8bkV86poJpqY1Z/ 9Ttfq973GKWTxTGo7Bz91N7+9pY82JS6ADqYPSu+Qdk5RB5V/WlsvAIleY9lLo2VN6E/ Tq9OKMECfAnYmLX9sfIrtbkwa8CUcj/QEOrXpugFiLwR3Wvk5aEgjLqpoxLLFGQoFzV7 uWqP/i3R43MmnhlZeb3s0oKrZxFCAUHrvIKiEPG05A7xzTS2ytlcRwp3W0cp1gWod5JH iStg== 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=iSJ51VG4pwSnxGdm2oAFOcfQvXSPpP2ZZmafGpjrKwQ=; b=d/kQ8vlhGFy5ctViNt9PSeQdXJT4rg4B5JtJEhRAN7PCSmg8hwSxcu6m4SEmKY69nU HXNxTKWHIy9ZWQvLmU8is5bE9ErCOc0+jz/8HvYj+GMiwv2HJL3YOxwFwJwD0hP75tNO dnAAA0dVTOrTTvQiM6Z/kKOE5Kq2vC3QB7cKEhYw1BL3hv3iwPs52sa3R3UOzy1t4BUE Yjo404TnB/APcbUjOTD0qN8AGi5cseHPXyAzmpfaXr4eYcuKn0eHa8euw+2RQlYpYdxA KSDTXp5433H9jp/z4dy4/P+Sw8aJeTfSew52oc4wz9Iz8tWlHJMieC34e/qcdBRAf288 6rEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="E+gCIy+/"; 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 cq25si1918786edb.107.2021.05.20.04.04.13; Thu, 20 May 2021 04:04:13 -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="E+gCIy+/"; 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 S237290AbhETLFC (ORCPT + 12 others); Thu, 20 May 2021 07:05:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:57202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238210AbhETLB7 (ORCPT ); Thu, 20 May 2021 07:01:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9DE6561D0F; Thu, 20 May 2021 10:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505036; bh=Mi2KtEz4PPUxtbCTXUfEY7jGyDAc7Vp0qP13vekl+RI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E+gCIy+/98dk+iXZIxN0HII2RMTIJx8pIPYleYn8bgXFLIO+WKh+qbKFTTQUuyn+Y CBHKF/+q9YoLG5tfctPOyDgUETch8Tz9W/+6eG62lu7anNaLvlDL3rfzxGdaeul4iV ioddnzVi5VFpRkXUjZv2FdAGqZAohRHGQ/RV2G3g= 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.9 194/240] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Thu, 20 May 2021 11:23:06 +0200 Message-Id: <20210520092115.177668376@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@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 671dbc28e5d4..59e04e2d9d9d 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; }