* [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport
@ 2026-06-03 13:27 Vladislav Nikolaev
2026-06-03 15:24 ` Fedor Pchelkin
2026-06-05 19:37 ` Sasha Levin
0 siblings, 2 replies; 3+ messages in thread
From: Vladislav Nikolaev @ 2026-06-03 13:27 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman, Sasha Levin, Zhu Yanjun, Doug Ledford,
Jason Gunthorpe, Haggai Eran, Kamal Heib, Amir Vadai, Moni Shoua,
Yonatan Cohen, Leon Romanovsky, Zhu Yanjun
Cc: Vladislav Nikolaev, linux-rdma, linux-kernel, lvc-project
No upstream commit exists for this patch.
The issue was introduced with backporting upstream commit b2b1ddc45745
("RDMA/rxe: Fix the error "trying to register non-static key in
rxe_cleanup_task"") to the 6.1 stable tree as commit 3236221bb8e4
("RDMA/rxe: Fix the error "trying to register non-static key in
rxe_cleanup_task"").
The 6.1 backport guarded qp->req.task and qp->comp.task before calling
rxe_cleanup_task(), but left qp->resp.task unguarded. It also kept the
responder task cleanup before deleting the RC timers, while upstream had
already moved it after the timer shutdown by commit 960ebe97e523
("RDMA/rxe: Remove __rxe_do_task()").
In the 6.1 tree, rxe_qp_from_init() calls rxe_qp_init_req() before
rxe_qp_init_resp(). Therefore, if rxe_qp_init_req() fails, cleanup can
run before qp->resp.task has been initialized by rxe_init_task(), and the
unconditional rxe_cleanup_task(&qp->resp.task) can still hit the same
uninitialized task lock problem that upstream commit b2b1ddc45745 fixed.
Move responder task cleanup after deleting the RC timers, matching the
upstream cleanup order, and guard it with qp->resp.task.func like the
requester and completer tasks.
Fixes: 3236221bb8e4 ("RDMA/rxe: Fix the error "trying to register non-static key in rxe_cleanup_task"")
Signed-off-by: Vladislav Nikolaev <vlad102nikolaev@gmail.com>
---
drivers/infiniband/sw/rxe/rxe_qp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 709c63e9773c..171c0f4dcbec 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -781,13 +781,15 @@ static void rxe_qp_do_cleanup(struct work_struct *work)
qp->valid = 0;
qp->qp_timeout_jiffies = 0;
- rxe_cleanup_task(&qp->resp.task);
if (qp_type(qp) == IB_QPT_RC) {
del_timer_sync(&qp->retrans_timer);
del_timer_sync(&qp->rnr_nak_timer);
}
+ if (qp->resp.task.func)
+ rxe_cleanup_task(&qp->resp.task);
+
if (qp->req.task.func)
rxe_cleanup_task(&qp->req.task);
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport
2026-06-03 13:27 [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport Vladislav Nikolaev
@ 2026-06-03 15:24 ` Fedor Pchelkin
2026-06-05 19:37 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Fedor Pchelkin @ 2026-06-03 15:24 UTC (permalink / raw)
To: Vladislav Nikolaev
Cc: stable, Greg Kroah-Hartman, Sasha Levin, Zhu Yanjun, Doug Ledford,
Jason Gunthorpe, Haggai Eran, Leon Romanovsky, linux-rdma,
linux-kernel, lvc-project
On Wed, 03. Jun 16:27, Vladislav Nikolaev wrote:
> No upstream commit exists for this patch.
>
> The issue was introduced with backporting upstream commit b2b1ddc45745
> ("RDMA/rxe: Fix the error "trying to register non-static key in
> rxe_cleanup_task"") to the 6.1 stable tree as commit 3236221bb8e4
> ("RDMA/rxe: Fix the error "trying to register non-static key in
> rxe_cleanup_task"").
I may be wrong and then the stable kernel maintainers might correct me,
but there's been some consensus established in at least recent stable
patches workflow that if the backport version of the upstream commit is
incorrect or, in this particular case, incomplete - the corresponding
patches should be reverted from the affected stable branches and ported
properly once again. That would make it easier to follow in future.
See [1] or [2] for reference.
[1]: https://lore.kernel.org/stable/20260402-tavern-keen-2b4fa6b9@mheyne-amazon/T/#u
[2]: https://lore.kernel.org/stable/ahgiBNbwo7FudH9r@decadent.org.uk/
P.S: consider porting 1c7eec4d5f3b ("RDMA/rxe: Fix "trying to register
non-static key in rxe_qp_do_cleanup" bug") as well to 6.1/6.6 and other
relevant stables (if tinkering with this code anyway) ?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport
2026-06-03 13:27 [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport Vladislav Nikolaev
2026-06-03 15:24 ` Fedor Pchelkin
@ 2026-06-05 19:37 ` Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-06-05 19:37 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman, Zhu Yanjun, Doug Ledford,
Jason Gunthorpe, Haggai Eran, Kamal Heib, Amir Vadai, Moni Shoua,
Yonatan Cohen, Leon Romanovsky, Zhu Yanjun
Cc: Sasha Levin, Vladislav Nikolaev, linux-rdma, linux-kernel,
lvc-project
> [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport
Queued for 6.1.y, thanks.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-05 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 13:27 [PATCH 6.1] RDMA/rxe: Complete the rxe_cleanup_task backport Vladislav Nikolaev
2026-06-03 15:24 ` Fedor Pchelkin
2026-06-05 19:37 ` Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.