* [PATCH] RDMA/hfi1: quiesce SDMA asynchronous cleanup on exit
@ 2026-09-28 13:41 Hongyan Xu
0 siblings, 0 replies; only message in thread
From: Hongyan Xu @ 2026-09-28 13:41 UTC (permalink / raw)
To: dennis.dalessandro, jgg
Cc: leonro, linux-rdma, linux-kernel, jianhao.xu, Hongyan Xu
The SDMA state reference and completion cover the software cleanup
tasklet, but not the hardware cleanup tasklet, err_halt_worker, or
flush_worker. Queued instances can therefore access an SDMA engine after
per_sdma is released.
After the state machine has stopped, cancel err_halt_worker first
because it can publish the hardware cleanup tasklet. Then kill that
tasklet and drain the remaining flush work.
Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
---
drivers/infiniband/hw/hfi1/sdma.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index f253c8ee182d..a71fc8f2d37e 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -1569,6 +1569,9 @@ void sdma_exit(struct hfi1_devdata *dd)
* it is not running.
*/
sdma_finalput(&sde->state);
+ cancel_work_sync(&sde->err_halt_worker);
+ tasklet_kill(&sde->sdma_hw_clean_up_task);
+ cancel_work_sync(&sde->flush_worker);
}
}
--
2.50.1.windows.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-28 13:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 13:41 [PATCH] RDMA/hfi1: quiesce SDMA asynchronous cleanup on exit Hongyan Xu
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®