[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1674767085-18583-2-git-send-email-haiyangz@microsoft.com>
Date: Thu, 26 Jan 2023 13:04:44 -0800
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org
Cc: haiyangz@...rosoft.com, decui@...rosoft.com, kys@...rosoft.com,
paulros@...rosoft.com, olaf@...fle.de, vkuznets@...hat.com,
davem@...emloft.net, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: [PATCH net, 1/2] net: mana: Fix hint value before free irq
Need to clear affinity_hint before free_irq(), otherwise there is a
one-time warning and stack trace during module unloading.
To fix this bug, set affinity_hint to NULL before free as required.
Cc: stable@...r.kernel.org
Fixes: 71fa6887eeca ("net: mana: Assign interrupts to CPUs based on NUMA nodes")
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
drivers/net/ethernet/microsoft/mana/gdma_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index b144f2237748..3bae9d4c1f08 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -1297,6 +1297,8 @@ static int mana_gd_setup_irqs(struct pci_dev *pdev)
for (j = i - 1; j >= 0; j--) {
irq = pci_irq_vector(pdev, j);
gic = &gc->irq_contexts[j];
+
+ irq_update_affinity_hint(irq, NULL);
free_irq(irq, gic);
}
@@ -1324,6 +1326,9 @@ static void mana_gd_remove_irqs(struct pci_dev *pdev)
continue;
gic = &gc->irq_contexts[i];
+
+ /* Need to clear the hint before free_irq */
+ irq_update_affinity_hint(irq, NULL);
free_irq(irq, gic);
}
--
2.25.1
Powered by blists - more mailing lists