From: sashiko-bot@kernel.org
To: "Aibing Chen" <chenaibing@cmss.chinamobile.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net v3] net/rds: defer CM id destruction to a workqueue
Date: Tue, 17 Nov 2026 08:33:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-218420@kernel.org> (raw)
In-Reply-To: <20261117082145.1737-1-chenaibing@cmss.chinamobile.com>
> rds_ib_laddr_check_cm() destroys the RDMA CM id it created while
> rds_trans_get_preferred() holds rds_trans_sem for reading. The bind
> path then takes rds_trans_sem and afterwards handler_mutex in
> rdma_destroy_id(), while the CM callback path takes handler_mutex in
> cma_ib_req_handler() and afterwards rds_trans_sem through
> rds_conn_create(). lockdep reports the resulting cycle.
>
> Queue the destruction on rds_wq instead, so that rds_trans_sem is
> released before handler_mutex is taken. The work item is allocated
> before the CM id is created and owns the id until rdma_destroy_id() has
> run; if the allocation fails, the address check fails with -ENOMEM
> rather than falling back to the synchronous destroy, which would bring
> the deadlock back under memory pressure.
>
> rds_ib_exit() flushes rds_wq after rds_trans_unregister() so that no
> queued destroy runs after the module text is gone.
>
> Reported-by: syzbot+ccdb5058c3df2d94811c@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=ccdb5058c3df2d94811c
> Suggested-by: Hillf Danton <hdanton@sina.com>
> Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
> Suggested-by: Allison Henderson <achender@kernel.org>
> Fixes: ec16227e1414 ("RDS/IB: Infiniband transport")
> Cc: stable@vger.kernel.org
> Signed-off-by: Aibing Chen <chenaibing@cmss.chinamobile.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117082145.1737-1-chenaibing@cmss.chinamobile.com?part=1
next prev parent reply other threads:[~2026-11-17 8:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 15:05 [PATCH] RDMA/cma: add rdma_destroy_id_wq() and use it from RDS Aibing Chen
2026-11-15 0:18 ` Jason Gunthorpe
2026-11-16 6:47 ` Allison Henderson
2026-11-15 15:05 ` sashiko-bot
2026-11-16 7:54 ` [PATCH net v2] net/rds: defer CM id destruction to a workqueue Aibing Chen
2026-11-17 6:15 ` Allison Henderson
2026-11-17 7:54 ` sashiko-bot
2026-11-17 8:21 ` [PATCH net v3] " Aibing Chen
2026-11-17 8:33 ` sashiko-bot [this message]
2026-11-17 8:35 ` [PATCH net v2] " netdev-bot+sashiko
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=sashiko-outbox-218420@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=chenaibing@cmss.chinamobile.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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