提交 a7560200 编写于 作者: H Huazhong Tan 提交者: Greg Kroah-Hartman

net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data()

[ 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: 424eb834 ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 7c54ba4a
...@@ -2760,12 +2760,12 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv) ...@@ -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); hns3_free_vector_ring_chain(tqp_vector, &vector_ring_chain);
if (priv->tqp_vector[i].irq_init_flag == HNS3_VECTOR_INITED) { if (tqp_vector->irq_init_flag == HNS3_VECTOR_INITED) {
(void)irq_set_affinity_hint( irq_set_affinity_notifier(tqp_vector->vector_irq,
priv->tqp_vector[i].vector_irq,
NULL); NULL);
free_irq(priv->tqp_vector[i].vector_irq, irq_set_affinity_hint(tqp_vector->vector_irq, NULL);
&priv->tqp_vector[i]); 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; priv->ring_data[i].ring->irq_init_flag = HNS3_VECTOR_NOT_INITED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册