From: Jason Gunthorpe <jgg@ziepe.ca>
To: Aibing Chen <chenaibing@cmss.chinamobile.com>
Cc: leon@kernel.org, achender@kernel.org, davem@davemloft.net,
edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, rds-devel@oss.oracle.com,
linux-kernel@vger.kernel.org, hdanton@sina.com,
hackerowskiy@gmail.com,
syzbot+ccdb5058c3df2d94811c@syzkaller.appspotmail.com
Subject: Re: [PATCH] RDMA/cma: add rdma_destroy_id_wq() and use it from RDS
Date: Sat, 14 Nov 2026 20:18:51 -0400 [thread overview]
Message-ID: <20261115001851.GH2532299@ziepe.ca> (raw)
In-Reply-To: <20261114150541.1908-1-chenaibing@cmss.chinamobile.com>
On Sat, Nov 14, 2026 at 11:05:41PM +0800, Aibing Chen wrote:
> syzbot reported a possible circular locking dependency between
> rds_trans_sem and the RDMA CM handler mutex:
>
> CPU0 (bind path) CPU1 (CM callback path)
> ---- ----
> down_read(&rds_trans_sem) mutex_lock(&handler_mutex)
> rds_ib_laddr_check() cma_ib_req_handler()
> rdma_destroy_id() rds_ib_cm_handle_connect()
> mutex_lock(&handler_mutex) rds_conn_create()
> rds_trans_get_preferred()
> down_read(&rds_trans_sem)
>
> rds_ib_laddr_check_cm() destroys the CM id from inside
> rds_trans_get_preferred()'s read-side critical section, while CM
> callbacks create RDS connections (taking the same read lock) from
> under handler_mutex.
>
> Break the cycle by destroying the CM id asynchronously: add
> rdma_destroy_id_wq(), which queues the destruction on cma_wq, and
> switch rds_ib_laddr_check_cm() to it. The destroy work is embedded
> in struct rdma_id_private, which keeps the id alive until the work
> runs; rds does not touch cm_id after the destroy call.
This doesn't seem like it should be the core codes problem? Why can't
rds do the workqueue?
Jason
prev parent reply other threads:[~2026-11-15 0:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 15:05 Aibing Chen
2026-11-15 0:18 ` Jason Gunthorpe [this message]
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=20261115001851.GH2532299@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=achender@kernel.org \
--cc=chenaibing@cmss.chinamobile.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hackerowskiy@gmail.com \
--cc=hdanton@sina.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rds-devel@oss.oracle.com \
--cc=syzbot+ccdb5058c3df2d94811c@syzkaller.appspotmail.com \
/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®