Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3717748imu; Tue, 18 Dec 2018 03:04:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/W4nuUrT8iq+UWD4h5Uj80T5W2iW5nEhW6UZoPv8CtFJpHTPu7PqDLjjwU3wLLiLjAjtZ1M X-Received: by 2002:a17:902:20e9:: with SMTP id v38mr15255943plg.250.1545131095273; Tue, 18 Dec 2018 03:04:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545131095; cv=none; d=google.com; s=arc-20160816; b=Lwe2+6zPenBroyKeZV2grxJTBDG/EK8i9FOh7wm4xhc20bb/JZJePNT1yIKQBHiJDg i1OMdyg83dRhyG576j+VrTjKrtioSH2MOML3KBMW4O8QYZGzcwkM0ZA4DW35L+S2lHW7 6ZzSgucqqUYz++1eO6VqIjThcTiTKsQF/WfWLpTVNNwsCp6guVgOAJZldl5HuvhP/zfr S98Y9hLqSsuPt2mMMqF3Vv6ADBF1Wyzjp2nNiFyCkTj14RHFUpE6cpDm1ewDe0BgiNn2 rs4firhonciKCM3ePK04gXrWjoMyLV0MFxzje4PjaFcUL4AJWJNFubhT29xdRWq9GZ/T btow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=4xqNzJqSO5+hOg4Oq4l+1nPDDmJp/XhRXH+JQkgL1Ks=; b=eFFtYxwvKhwse3dvgpKdhLvNIZFYd7tVRa1p0PddTGsYTHEZMbOjLRQPGaw2ZM89+f oM/aXRjhP39s1zUXBi2CyN6LUQ95CrMc86wdS/tOHJAuRVmx8Q59rfpoM3ZmEXVUOsKy FVCjidG86ysV97Dy4QB7/2+Oet7FPe5A19OWWZniRrVPgK2ilgF15CHj/+CNiIh6OdOF 6cERCCCX+27FXxsCtd8eM0bkOAdD8BTWOpD2dDuQHUufK9Jr24f3uzRTdUb8XhRuBuEs PRgkU1/7vgKhqBxgp8JWu4zC5XRxyA9wrOp7JPmt2u+xS3tRtmwrPIDLHDkTm3sjC4Xg NHSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si12549834plo.254.2018.12.18.03.04.37; Tue, 18 Dec 2018 03:04:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbeLRLCM (ORCPT + 99 others); Tue, 18 Dec 2018 06:02:12 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38226 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726686AbeLRLCI (ORCPT ); Tue, 18 Dec 2018 06:02:08 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DDD4C97A19CCA; Tue, 18 Dec 2018 19:02:03 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Tue, 18 Dec 2018 19:01:57 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net-next 06/12] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() Date: Tue, 18 Dec 2018 19:37:53 +0800 Message-ID: <1545133079-79605-7-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> References: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan In the hns3_nic_uninit_vector_data(), the procedure of uninitializing the tqp_vector's IRQ has not set affinity_notify to NULL and changes its init flag. This patch fixes it. And for simplificaton, local variable tqp_vector is used instead of priv->tqp_vector[i]. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index e7cde08..354eca8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3181,12 +3181,12 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv) hns3_free_vector_ring_chain(tqp_vector, &vector_ring_chain); - if (priv->tqp_vector[i].irq_init_flag == HNS3_VECTOR_INITED) { - (void)irq_set_affinity_hint( - priv->tqp_vector[i].vector_irq, - NULL); - free_irq(priv->tqp_vector[i].vector_irq, - &priv->tqp_vector[i]); + if (tqp_vector->irq_init_flag == HNS3_VECTOR_INITED) { + irq_set_affinity_notifier(tqp_vector->vector_irq, + NULL); + irq_set_affinity_hint(tqp_vector->vector_irq, NULL); + free_irq(tqp_vector->vector_irq, tqp_vector); + tqp_vector->irq_init_flag = HNS3_VECTOR_NOT_INITED; } priv->ring_data[i].ring->irq_init_flag = HNS3_VECTOR_NOT_INITED; -- 1.9.1