Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2759139imj; Mon, 11 Feb 2019 08:04:11 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1IyScFxkfYd5W8vxbQE5r+nKAUxa2QcpzgDh46ylg8JdSOWEYQ84lNEdkcaA0o6wymFau X-Received: by 2002:a17:902:2969:: with SMTP id g96mr37943394plb.295.1549901051660; Mon, 11 Feb 2019 08:04:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901051; cv=none; d=google.com; s=arc-20160816; b=bnJW7GmtlA9VR/XjHVNfkXmTfdUHBxUbpyeYvmxGcuuXi7CdyMCdYJ6+8I2WRTm86A tu6nEyofsCJXKvMFFSas2bmBuX4j8A4D3bDctYfpdjU5WKDSj/r/9KuiMhNaX4qfVedS zpyAQOmwogM11nXcIJX7A05AgAdTqEBDre4JbuvW5uF0bSoiJLIFNU7QKmepFQe9B1FE 9ivm1xbmknupoFWSWE6IqxqSCj0CoVe1V2cDUNLmQbdOVcLJMhEdSAEYR8BuL83XkBH4 B2Rovi2avXLWgKFqrxCDhbSE7yH/7xEXlL69XzV4+FSx6mI2IV23P9Q7FoPLM59RMRhk hqWA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m2lrUTosxz7ZUoLK8g2yqNN/MABBTLIXV3n0BVTffpM=; b=LpFzGjLhrC0O0iwMo4A76SsVTgMv9TksdeWfnVpxuu50gVV1cIaKqOIo8zYKT+uuPE P3bwx1fr/mE91Ku3taX16ya9craj+/3JLznaVdZJRYky6eYrhR5Yyz2mgpAdXb7RdSkQ rGiHvv7nCE+anRYaL+TxtB6WoP1k2OpL7fTGGssESjV15+qKlTgrZlFCnT6mhvTNquf0 ElP3vX7/5C2m1VEWEmY4jE9GEfmYbgtTl7IRS7ZFJWkaZ0HPTbRZ7aVbmAaZWIFrf8F5 IafayA7kxqolLCqflDzyR+ku4SwHXfZ/Rb5sfc7Cg5sz5E475cquA1qU3GqPMe5Cs6ZQ u3MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="qF/XCtbU"; 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 e17si9630271pgv.452.2019.02.11.08.03.51; Mon, 11 Feb 2019 08:04:11 -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="qF/XCtbU"; 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 S1730160AbfBKOal (ORCPT + 99 others); Mon, 11 Feb 2019 09:30:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:37166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729724AbfBKOak (ORCPT ); Mon, 11 Feb 2019 09:30:40 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E490820844; Mon, 11 Feb 2019 14:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895439; bh=Bo/Ka2ucu4QoXjV4LqqcgqyzgA7UTGGPgmtiOF9ZTTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qF/XCtbU8O0ZuoUkoz4Kjmr/FftQM8TI/UO17amn8WHhjOMt5QIkMMr+wq8vjJp6j E62nV0DwyErvsvFy4bo3MjXL5dbq18i5qtOPn29019MXVBZvd7fKxrtEHlOOn30dFT hyCv6can5yacnFcnEhAX3bs4+dIMSMR5sRWrvLhE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huazhong Tan , Peng Li , "David S. Miller" , Sasha Levin Subject: [PATCH 4.20 205/352] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() Date: Mon, 11 Feb 2019 15:17:12 +0100 Message-Id: <20190211141900.198909864@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 4aea3f57586e..85d534a24f2c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -2971,12 +2971,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