From: sashiko-bot@kernel.org
To: "Deepanshu Kartikey" <kartikey406@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/cma: Don't warn when device removal races with rdma_resolve_addr()
Date: Sun, 01 Nov 2026 11:13:17 +0000 [thread overview]
Message-ID: <sashiko-outbox-192379@kernel.org> (raw)
In-Reply-To: <20261101105615.20253-1-kartikey406@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] RDMA/cma: missing comment in resolve_prepare_src() promised by commit message
--
commit b9b0fc41a9bfe112cf7965b88795f6ea037bc2e0
Author: Deepanshu Kartikey <kartikey406@gmail.com>
RDMA/cma: Don't warn when device removal races with rdma_resolve_addr()
This commit removes the WARN_ON() in resolve_prepare_src() when
transitioning an RDMA CM ID from RDMA_CM_ADDR_BOUND to RDMA_CM_ADDR_QUERY
after cma_bind_addr(), as a concurrent device removal can legitimately
change the state to RDMA_CM_DEVICE_REMOVAL.
> Drop the WARN_ON() and keep returning -EINVAL, and document in a comment
> that the state may change because of device removal.
[ ... ]
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 337a49d1acf72..a30f367753241 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -4117,8 +4117,8 @@ static int resolve_prepare_src(struct rdma_id_private *id_priv,
> ret = cma_bind_addr(&id_priv->id, src_addr, dst_addr);
> if (ret)
> return ret;
> - if (WARN_ON(!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND,
> - RDMA_CM_ADDR_QUERY)))
> + if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND,
> + RDMA_CM_ADDR_QUERY))
> return -EINVAL;
[Severity: Low]
This isn't a bug, but the commit message mentions documenting in a comment
that the state may change because of device removal, whereas the diff in
resolve_prepare_src() in drivers/infiniband/core/cma.c only removes the
WARN_ON() around cma_comp_exch(). Was that comment accidentally left out of
the patch, or should the commit message be updated?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261101105615.20253-1-kartikey406@gmail.com?part=1
next prev parent reply other threads:[~2026-11-01 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 10:56 [PATCH] RDMA/cma: Don't warn when device removal races with rdma_resolve_addr() Deepanshu Kartikey
2026-11-01 11:13 ` sashiko-bot [this message]
2026-11-01 20:26 ` Zhu Yanjun
2026-11-02 10:08 ` Deepanshu Kartikey
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-192379@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kartikey406@gmail.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