* [PATCH 5.10] RDMA/hfi1: shut down the trap timer before unregistering
@ 2026-12-01 15:00 Alexander Martyniuk
0 siblings, 0 replies; only message in thread
From: Alexander Martyniuk @ 2026-12-01 15:00 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman
Cc: Alexander Martyniuk, lvc-project, Mike Marciniszyn,
Dennis Dalessandro, Doug Ledford, Jason Gunthorpe,
Michael N. Henry, Michael J. Ruhl, linux-rdma, linux-kernel,
Hongyan Xu, Leon Romanovsky
From: Hongyan Xu <getshell@seu.edu.cn>
commit a1c9d476c2316685f85fffb6450ad88d01836357 upstream.
MAD processing arms a trap timer embedded in each hfi1_ibport. Device
unregistration does not stop the timer, so its callback can run after
the port and its containing hfi1_devdata have been released.
Shut down every port timer before unregistering the IB device. The
shutdown form also prevents a concurrent path from rearming the timer.
Fixes: bf90aadd630c ("IB/hfi1: Send MAD traps until repressed")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
Link: https://patch.msgid.link/20260928134151.1213-1-getshell@seu.edu.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
[Alexander: del_timer_sync() used instead of the timer_shutdown_sync()]
Signed-off-by: Alexander Martyniuk <alexevgmart@gmail.com>
---
Backport fix for CVE-2026-139571
drivers/infiniband/hw/hfi1/verbs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c
index 693922df3543..06cb57da73b2 100644
--- a/drivers/infiniband/hw/hfi1/verbs.c
+++ b/drivers/infiniband/hw/hfi1/verbs.c
@@ -1950,6 +1950,10 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
void hfi1_unregister_ib_device(struct hfi1_devdata *dd)
{
struct hfi1_ibdev *dev = &dd->verbs_dev;
+ int i;
+
+ for (i = 0; i < dd->num_pports; i++)
+ del_timer_sync(&dd->pport[i].ibport_data.rvp.trap_timer);
hfi1_verbs_unregister_sysfs(dd);
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-01 15:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 15:00 [PATCH 5.10] RDMA/hfi1: shut down the trap timer before unregistering Alexander Martyniuk
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®