Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3026068pxj; Mon, 17 May 2021 15:55:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo6lNw6nYbLTn9lFSFHXNN4ThL9jHhSGEJ9+/6C8+79nBTPPUkjRSPUvSNB28/QXd/vK+0 X-Received: by 2002:a6b:8b89:: with SMTP id n131mr1875618iod.142.1621292100283; Mon, 17 May 2021 15:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292100; cv=none; d=google.com; s=arc-20160816; b=ZyF9ZkXfmbIxCGJyLARKDTgFRf2QXZYFK3vFdmepzn036mRys6I9l5e0eGHmNTd23h w6A98NZowRVMPSrhDjBUxUN9p+TOcUhut6JcNx2Ez4AVLw/0WLrH6sruectirO/PLGd3 CWFuVfdJ9/VYzjBQRzLu0nED6BnOwtMi5DWiv7Mov5UfzYGnTaimOkMm90bAfxvD9Lh/ 5jdnk3kCgZGi8q0Km9Ly2tF0BZNmxPzqgLWjYgLHbLJ2mZ9eJPwmAn8vBci3ujayAGEX ff8G096QD2UN9QCn8uOzKnBssXhl6hORPfllA0jUjbkEDEvY4Yf10GVxXHIHoSItkQDt /TIw== 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=gRmLE8zxrs2Xly0C2KcgIxPnx8RGuHe7ERY/C2he2+Pdf8SY6ZOubYhu1vyc/5P1q5 ikvOlYWyso0q2a+rNXiYXrURDnCHbk+YF1wDEPTLTx66VKuniUmA7FWS/krRt8M9sdDZ U/wxr1yUwn+2P79TzibKo5NYgTtl5I0anN/7h5zxsK317bGtzIR4wa7Aw8q6uoqNIqOf N74e22C4FokseULpWCXeU4j2Bk9hwwTEpeAngD63Nx++J9GbOguEW/MZY1ly8yjDT3+9 Dyt1Dp7ZgtS5DbjJmcc1nKe7/SFdiI3viVs8XW70Ga7o0dHEKrZ7geARjQI9+QBUssgi W+yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hD6ng9k/"; 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 d2si18073544ios.97.2021.05.17.15.54.25; Mon, 17 May 2021 15:55:00 -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="hD6ng9k/"; 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 S239021AbhEQOSB (ORCPT + 99 others); Mon, 17 May 2021 10:18:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:43802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236996AbhEQOPQ (ORCPT ); Mon, 17 May 2021 10:15:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4BA92613F0; Mon, 17 May 2021 14:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260561; bh=Bd27FTLLPS9PaoiW4XggeiQQjUdXygHDGB8ss44Di7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hD6ng9k/muhreWwruBR7Q3HEHTv2cc5JsXeYyAmzqBLXpy58+kgBwuXSjtoKNWmRy 7jY3kav5tSKFy+E6WSYh6WDpuvQLwgo1ptUtYmjxMCskNiClb3JI/nRJHX4IxUNqXS IfElpppxrIxZ/TSH64tCJrEaAeuIsXozV0nue9Zo= 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.12 136/363] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Mon, 17 May 2021 16:00:02 +0200 Message-Id: <20210517140307.225207017@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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