From: Alexander Martyniuk <alexevgmart@gmail.com>
To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Martyniuk <alexevgmart@gmail.com>,
lvc-project@linuxtesting.org,
Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>,
Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
"Michael N. Henry" <michael.n.henry@intel.com>,
"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Hongyan Xu <getshell@seu.edu.cn>,
Leon Romanovsky <leon@kernel.org>
Subject: [PATCH 5.10] RDMA/hfi1: shut down the trap timer before unregistering
Date: Tue, 1 Dec 2026 18:00:53 +0300 [thread overview]
Message-ID: <20261201150054.510414-1-alexevgmart@gmail.com> (raw)
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
reply other threads:[~2026-12-01 15:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201150054.510414-1-alexevgmart@gmail.com \
--to=alexevgmart@gmail.com \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=dledford@redhat.com \
--cc=getshell@seu.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=michael.j.ruhl@intel.com \
--cc=michael.n.henry@intel.com \
--cc=mike.marciniszyn@cornelisnetworks.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®