Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp557795pxj; Thu, 20 May 2021 16:10:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy45FjPH+0T7vVyg7af2LZfLa2y/OsGNJuf8x7CE04etI2wDRMz7sUqS7yyYdcRSMgLfiC X-Received: by 2002:a05:6402:176b:: with SMTP id da11mr6254166edb.234.1621552253997; Thu, 20 May 2021 16:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621552253; cv=none; d=google.com; s=arc-20160816; b=HN4lKKHUAfBnplFnYpUu5VPQp8D5DYalNvm0N8+eGbYrBuZdrpGt8D+5IILHPaP7Dp b3X+n9J4MoUULwa4EyO8+1wowmu9Xk2xVOfbvJl/CHK34hO6qFIRmZUozCTR4qCpoz1x HrSDVIVHqh8414xkPKbcifZah25n53nV+o8ViBdeknaWvNQhCECn4zlVnKy0jQzvlJtM qRgJDCxlV0/3jBADqMqvCWrHmS8IBkY2Yk7tvqk0bikOi4AFBRkTcovZ8Ee0NNvjV3Xa BF7MSlRMexxBwQB+QfowUzE3t50J9ED8lNYm0cYfHnDH4I8Pvl+d31d686KG13q59G1J PeWA== 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=YTQwI31/wcoDwJkz/ElGsTE1TfQuy+pArY8rQCAcRi0jYiyM/oh9+k6V3iMZHCtLb0 97pRQEY1KyqoJsPE5t4swwPbVx8Eo0sQ50u5hU1S9wDdp3CTVvBDdvPUMOPYSNcmhfNN 4+zELB8wDPpAsBS0lRgrMuvDt1lDEGY2XT6582WV5bvbMTm4Mslk8j/jY4ZFdTvrkfqp sSXljuLrOgns+TtqYYoFAmp0ufElqEtCe0/1Dem2ZIhMmJN8DUW8LWiB6/o30VsA69YT yDjefuPlo7mxP0rwAc30+631Z01Kytm0w/d0sssTRQdUDp2gQoP7lIO4/6fXqi0vco8Y /BsQ== 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 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 hq1si3134217ejc.659.2021.05.20.16.10.30; Thu, 20 May 2021 16:10:53 -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="E+gCIy+/"; 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 S240211AbhETLWl (ORCPT + 99 others); Thu, 20 May 2021 07:22:41 -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 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 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; } -- 2.30.2