Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp460399pxj; Thu, 20 May 2021 13:29:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyodC99AVJRWdJ6eNurqBfh+hZqb8U3GsymBSX7iAYYZi3wLhV2J7gBtF137UQqIY4mSl6E X-Received: by 2002:a5d:9c10:: with SMTP id 16mr7648968ioe.101.1621542547336; Thu, 20 May 2021 13:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621542547; cv=none; d=google.com; s=arc-20160816; b=VFMX58pmgJSXR0LzGK9cqzOjtOA9ptoxm37BFh6y6Yfewp687S4uQTHYpK74TnNLeO 6qEPONpvQcdYw6jVx9vOxbt8vlHPADzcLuVRD1jdg6IYEAPnefKOlXaAhgZCk6EyzHuo xhyPh4sJAIL5RKRZZtAYUTCgYpvaubP8N/d0l8D0W9cowpnKBH5wDkHtna/IJ/PJFTqf K7/RC9967qSVRG6BSI+smyc4DNzIwVAldwsb9J3Wqzi4QFDTdg96xikSWxZw8/xaYTt6 k7sh3FalU/Tptd0yP+Y1gzTKA5Hbfj91sgsR20gmAvhw/HnKZtOtaWNvC20rRE3HK2tW rOdg== 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=V/gbVCGQAaoYzONbGaNaG4x7j46N+Ex2sfosPF4/sXQ=; b=bHyb3u11rNKtFONOkPEGLItSGmMlhhmMbdh8XgAtK97gz3Z7/D8eLHhccZXW7F6FwE 5pSGcfwec1TGUZdgCRO49c0DjpZp0AnVNr8iZUDBz0F3lS/9wL5TLNFgpT0KckGK+/9w n3ff10j15D/sMOln3zLv0IznGdCI5aNrp3a5ePwAClthgfE61MU9+MvgsLN/CF9rz5nD SCiEQRftyXdFhfbP7McMmpohoNLeWxjxJyPLu/Rsu6KDy2FndHo/y5idwZl3Tf+UEuXD Z6eTxVSddY7uiqNEgcZUx564qdUtarHwvixtKjc5OnDt1OiKUw5XoXttYqaG5LfaaF/4 3O8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FCsDaC+3; 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 n9si3050160jaj.15.2021.05.20.13.28.54; Thu, 20 May 2021 13:29:07 -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=FCsDaC+3; 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 S235604AbhETKxR (ORCPT + 99 others); Thu, 20 May 2021 06:53:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:39830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237035AbhETKhi (ORCPT ); Thu, 20 May 2021 06:37:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD1BB61028; Thu, 20 May 2021 09:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504473; bh=pGu03cSKt+WyMW0tlmj5EazWyMjrwqviDqV+5VjWCuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FCsDaC+3OrlG5NZUgfQwE8p3ysx2ZAcwfpAN4coSZw16W1v4RB9TZ5TYrHXb9yIsR qhuvIlS4sPOrPp0RxkWpzzSF2CCKFhp+K8WLWHxBDVFLe4RsoX0ofMWEr8+PEbET/R R34fx6wk7SR5D9yjZ/TBlubcEk45ObYRD0pg0qps= 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.14 261/323] ARM: 9064/1: hw_breakpoint: Do not directly check the events overflow_handler hook Date: Thu, 20 May 2021 11:22:33 +0200 Message-Id: <20210520092129.159877833@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 e61697fb7efe..a8783964ebde 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