Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shin'ichiro Kawasaki" <shinichiro.kawasaki@wdc.com>,
	linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2] RDMA/cma: Use a separate lockdep class for the listening cm_id
Date: Fri, 20 Nov 2026 02:43:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-224377@kernel.org> (raw)
In-Reply-To: <av-vJXx2CZppcnAW@shinmob>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] RDMA/cma: missing Signed-off-by trailer in commit message
- [High] RDMA: debug msleep() in siw_accept(), nvme_rdma_alloc_queue(),
  and nvmet_rdma
--

commit e60962bf8161cfd3de3b001dc6bdc13944ed9245
Author: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

> RDMA/cma: Use a separate lockdep class for the listening cm_id
>
> On Nov 18, 2026 / 20:53, Shin'ichiro Kawasaki wrote:
> > On Nov 17, 2026 / 11:48, sashiko-bot@kernel.org wrote:
> > > Thank you for your contribution! Sashiko AI review found 2 potential
> > > issues to consider:
> > > - [Medium] RDMA/cma: unsafe lockdep_set_class() placement in
> > >   rdma_listen()
> > > - [Low] RDMA/cma: unreclassified handler_mutex on
> > >   nvmet_rdma_enable_port() error
> >
> > I think the two issues are valid. The first one means that the approach
> > to reclassify ids in rdma_listen() does not work well. I will think about other
> > solutions. One idea is to go back to the solutions to add a new function to
> > create rdma id. The other idea is to reclassify the rdma ids not for
> > listening. I will try if these approach can address the sashiko issues.
>
> While I worked on the new patch to reclassify the rdma ids not for listening
> but for other requests, I ran a local Sashiko review on it before posting.
> Sashiko made the comment below, quote:

[Severity: High]
The commit message is missing a Signed-off-by: trailer, which is required
under the Developer's Certificate of Origin.

> diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c
> index ed49818793dde..bea7c7aacd678 100644
> --- a/drivers/infiniband/sw/siw/siw_cm.c
> +++ b/drivers/infiniband/sw/siw/siw_cm.c
> @@ -1738,6 +1738,7 @@ int siw_accept(struct iw_cm_id *id, struct iw_cm_conn_param *params)
>  		siw_sk_assign_rtr_upcalls(cep);
>  	} else {
>  		siw_qp_socket_assoc(cep, qp);
> +		msleep(300); /* REPRO: let the host send before ESTABLISHED */
>  		rv = siw_cm_upcall(cep, IW_CM_EVENT_ESTABLISHED, 0);
>  		if (rv)
>  			goto error;
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 32189fdfc0f51..e8c55dfad9d54 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -583,6 +583,8 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_queue *queue)
>  	struct sockaddr *src_addr = NULL;
>  	int ret;
>  
> +	if (idx == 2)
> +		msleep(1000); /* REPRO: connect I/O queue 2 later */
>  	mutex_init(&queue->queue_lock);
>  	if (idx && ctrl->ctrl.max_integrity_segments)
>  		queue->pi_support = true;
> diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
> index f386c388da188..cde0315ae71e4 100644
> --- a/drivers/nvme/target/rdma.c
> +++ b/drivers/nvme/target/rdma.c
> @@ -1673,6 +1673,8 @@ static void nvmet_rdma_queue_established(struct nvmet_rdma_queue *queue)
>  {
>  	unsigned long flags;
>  
> +	if (queue->host_qid)
> +		msleep(10000); /* REPRO: give time to unlink the port */
>  	spin_lock_irqsave(&queue->state_lock, flags);
>  	if (queue->state != NVMET_RDMA_Q_CONNECTING) {
>  		pr_warn("trying to establish a connected queue\n");

[Severity: High]
Were these debug reproducer msleep() calls committed by mistake instead of
the lockdep class change described in the subject?

In nvmet_rdma_queue_established(), sleeping for 10 seconds on every I/O
queue runs inside the RDMA_CM_EVENT_ESTABLISHED callback under
id_priv->handler_mutex on the single-threaded ordered iwcm_wq workqueue.
This stalls CM event processing and rdma_destroy_id() for 10 seconds per
I/O queue, exceeds the default 5-second NVMe admin keep-alive timeout, and
forces open the nvmet_config_sem deadlock window.  siw_accept() and
nvme_rdma_alloc_queue() likewise add unconditional 300 ms and 1000 ms
delays during connection establishment.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/av-vJXx2CZppcnAW@shinmob?part=1


      reply	other threads:[~2026-11-20  2:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 11:31 [PATCH v2] RDMA/cma: Use a separate lockdep class for the listening cm_id Shin'ichiro Kawasaki
2026-11-17 11:48 ` sashiko-bot
2026-11-18 11:53   ` Shin'ichiro Kawasaki
2026-11-20  2:35     ` Shin'ichiro Kawasaki
2026-11-20  2:43       ` sashiko-bot [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=sashiko-outbox-224377@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shinichiro.kawasaki@wdc.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