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 E4D8EECE58D for ; Wed, 9 Oct 2019 09:27:18 +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 B3BA2206C0 for ; Wed, 9 Oct 2019 09:27:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qGVhwPZQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3BA2206C0 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=qGVhwPZQHpr09Y hANzTes7TlxGs8opYc1V9j6Aoc1XNhINT2LH1BZkyLjY0jVHnDw6WRvNFK0C59KG4firN80OPl8nU m8+N0lWtzV41hJlqq7O1qGO4qaFU+WqvInft8tuC0as141THt41yXE47XriM4z0Ut6TGfRWhz2JkM COFDxHiY1elOQUAspYrwvYDbZysqSSxpQatdYGO/YIWRMEE47ANiUE9PtHcpQw6/bMIz75qhCwSiz K90SiWYKYW6MLAsn4Ey74kylv4JLiLB1aJf00QncUh4/7qgbdao6GKQ+DL0TTAtqvtJDOGP9Cn+G0 evRDnoBTQuLIBbkB2feg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iI8FY-0000aT-HZ; Wed, 09 Oct 2019 09:27:16 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iI8FV-0000Z1-Cs for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2019 09:27:14 +0000 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D8C028BB72C28AEADD15; Wed, 9 Oct 2019 17:27:06 +0800 (CST) Received: from use12-sp2.huawei.com (10.67.188.167) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Wed, 9 Oct 2019 17:27:04 +0800 From: wangxu To: , , , , Subject: [PATCH] ARM/hw_breakpoint: modify dead code for breakpoint_handler() Date: Wed, 9 Oct 2019 17:27:00 +0800 Message-ID: <1570613220-59533-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-20191009_022713_601804_A2DD7BCE X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. 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