From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0B71C47404 for ; Sat, 12 Oct 2019 03:28:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80CD72084C for ; Sat, 12 Oct 2019 03:28:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rr8ssWdX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80CD72084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+Fq2wnxcKQVHdMv7P9VvSJNy7jBfTt0eOyg+zFqDmA0=; b=rr8ssWdX9085jb L1AATByiUn6ySigBPWZfIxlgx8CQfYq7VGCG7Dy8I3lOTXYoz5ST4wRRrVsvUfL7nb6H2bMCWKKGa l/laTqMzvEgUXlEne0wLGs7yutgmXQfVI8vnEa28SczaglQVsPzS9cgWfABpQCEz+ZYKOZEhmrZgr ucvOU4fAGKJEa1gG/Ox3qrwTl8Y9X7HUT9OLDmNcjLYRvftfBXYWU4Fvk3DcBsi8C49ndjBVaBS/n sGj0UZfAucirdT7lZuvjhOtuBbq265TmHRoXsAzsK3QGrAgYWTB1PRP5z7GIfxXwSCTZwjXiUtmdZ T5tTDQ4jN1x6tg8FP6VQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iJ859-0002Qi-Sc; Sat, 12 Oct 2019 03:28:39 +0000 Received: from szxga06-in.huawei.com ([45.249.212.32] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iJ856-0002PT-FD for linux-arm-kernel@lists.infradead.org; Sat, 12 Oct 2019 03:28:38 +0000 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2037E54A95FE5E61D5D6 for ; Sat, 12 Oct 2019 11:28:26 +0800 (CST) Received: from use12-sp2.huawei.com (10.67.188.167) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Sat, 12 Oct 2019 11:28:22 +0800 From: wangxu To: Subject: [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler() Date: Sat, 12 Oct 2019 11:28:19 +0800 Message-ID: <1570850899-10646-1-git-send-email-wangxu72@huawei.com> X-Mailer: git-send-email 1.8.5.6 MIME-Version: 1.0 X-Originating-IP: [10.67.188.167] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191011_202836_668886_2EACF95A X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Wang Xu In perf_event_alloc(), event->overflow_handler is initialized to a non-null value, which makes enable_single_step(bp, addr) in breakpoint_handler() never be executed. As a matter of fact, the branch condition has been updated to is_default_overflow_handler(). Signed-off-by: Wang Xu --- 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 b0c195e..586a587 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -822,7 +822,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; } -- 1.8.5.6 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel