Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3633776imu; Mon, 28 Jan 2019 08:10:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN7EysltWXF93FNdMjXjfjMHlI6k2AcqWtQhwMQW2Nzh+MqJ5g7/gjsxf4foGyY2M4SFdvIv X-Received: by 2002:a62:3305:: with SMTP id z5mr22783711pfz.112.1548691830063; Mon, 28 Jan 2019 08:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691830; cv=none; d=google.com; s=arc-20160816; b=KUycSqvm4wq0ZFlYcfnM+yK7UpEoHxdFD7rR28aXOc6d+nDt3V+LpV25rhT/JQBJAa qSAS8dVp7Uw4L4lC14Fqd74EruAhzOtJkfDKr8Fen28V6HM2MIJ/DpFkBEahfGudCSSL ab2epWkuyZ9P1PUA1YJaofGNzvvxDb4Ns3RLCr6i70ySk1CjeQ+GUbz/4BbAV2nXJZMw yDCei4hmOQksqTV1YfH2eZv5b8/ccek5Ru/uJ3spKiDUxNtWuoHk8o55eEKW2t/e1coy FXPNo1gWySmrIgS+FjBfjWqTjFFnYM4UK3KLJl08HVIRMgEo+n42bCDxsWfH04nCKooz 59Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/RplkSLSLHKNUXTNB893zWLbPl/Iq/aHECnTwm7mtTU=; b=srPa8NwhF+RrHqRlb6lixDZngh7x+bdzzpkdMikyh7wYU4msz7nRHdB6PA57GcFl2D ueAH0uNEVMKDndJU6mf1f97c5hlust36TZtiefZqBPS2AHE+OImPnt3FU3EyVBaJS8X+ XtrrvCei9fcbuph7eOIurVxOc3F+Jjo1ID8Os7km70whAy5bjbpDAGQozT3cJeBEn6hb 7Y8g9K7qM0ZD4+fNmSJL97P4MPXHd5JlNM8IWuvDZET7P4ohGP7SpINgs/nhx/ZeBlUy PHGWx0mA0Rioh1j6TTc0vhtzugld+Tp/U0/EGELgBch2cAY1aUbJEC9tkt5JHQJ5IteB +vgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CFCbisH1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si8068917pgh.505.2019.01.28.08.10.14; Mon, 28 Jan 2019 08:10:30 -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; dkim=pass header.i=@kernel.org header.s=default header.b=CFCbisH1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732305AbfA1QH7 (ORCPT + 99 others); Mon, 28 Jan 2019 11:07:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:59198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732293AbfA1QH5 (ORCPT ); Mon, 28 Jan 2019 11:07:57 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7F802147A; Mon, 28 Jan 2019 16:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691677; bh=BR4bgx02wSokLcF3yBUwOQMqeVuy81dkNLRPZ2aJkN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CFCbisH1zqrSVYaaiICGSqAMgXK2byRjfTWVxuHfr/aouWmWPF+5E4jL2+C6z8dd0 hGveIxDyboycCJz44b/IWT3Dps6YkA30jlOaCoqyapmFbSDWDgWi8mjV9oZ4qm4rlL YXNKJw5EyAnUzvmyKTL3OfTpsuf67tloACdKiT5Q= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Huazhong Tan , Peng Li , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 182/258] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() Date: Mon, 28 Jan 2019 10:58:08 -0500 Message-Id: <20190128155924.51521-182-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan [ Upstream commit ae6017a71115ebc4e5c1a3f0f451319ab3f5c447 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 b7b2f8254ce1..d5f15d8d18a9 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -2760,12 +2760,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; -- 2.19.1