mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] qed: drain slowpath tasklets during teardown
@ 2026-10-28  4:55 Jiale Yao
  2026-10-28  5:00 ` netdev-bot+sinfo
  0 siblings, 1 reply; 2+ messages in thread
From: Jiale Yao @ 2026-10-28  4:55 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Ariel Elior, Yuval Mintz, netdev, linux-kernel
  Cc: stable

qed_nic_stop() disables each slowpath tasklet before freeing the
interrupt and status block resources.  Disabling waits for a running
tasklet, but it does not remove a pending tasklet from the tasklet
queue.  A pending tasklet can therefore retain a pointer to the freed
qed_hwfn and its status blocks.

Kill the tasklet during the final slowpath teardown so pending work is
removed before the resources it accesses are released.

Fixes: fe56b9e6a8d9 ("qed: Add module with basic common support")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
 drivers/net/ethernet/qlogic/qed/qed_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 28a8a2b9d501..abe8a841b277 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -833,10 +833,10 @@ static int qed_nic_stop(struct qed_dev *cdev)
 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
 
 		if (p_hwfn->b_sp_dpc_enabled) {
-			tasklet_disable(&p_hwfn->sp_dpc);
+			tasklet_kill(&p_hwfn->sp_dpc);
 			p_hwfn->b_sp_dpc_enabled = false;
 			DP_VERBOSE(cdev, NETIF_MSG_IFDOWN,
-				   "Disabled sp tasklet [hwfn %d] at %p\n",
+				   "Killed sp tasklet [hwfn %d] at %p\n",
 				   i, &p_hwfn->sp_dpc);
 		}
 	}
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-28  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28  4:55 [PATCH] qed: drain slowpath tasklets during teardown Jiale Yao
2026-10-28  5:00 ` netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®