From: Leon Romanovsky <leon@kernel.org>
To: ogerlitz@ddn.com
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Mark Zhang <markzhang@nvidia.com>,
Patrisious Haddad <phaddad@nvidia.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/cma: Fix hardware address comparison length in netevent callback
Date: Wed, 17 Jun 2026 16:34:29 +0300 [thread overview]
Message-ID: <20260617133429.GA327369@unreal> (raw)
In-Reply-To: <20260617-fix-cma-ipoib-v1-1-03f869344304@ddn.com>
On Wed, Jun 17, 2026 at 02:21:05PM +0300, Or Gerlitz via B4 Relay wrote:
> From: Or Gerlitz <ogerlitz@ddn.com>
>
> The cited commit hardcoded the hardware address comparison len to ETH_ALEN.
>
> This breaks IPoIB, which uses 20-byte addresses. By truncating the
> memcmp, the CMA may incorrectly assume the target address is
> unchanged and fails to abort the stalled connection.
>
> Fix this by replacing ETH_ALEN with the dynamic neigh->dev->addr_len
> to correctly evaluate the full address regardless of the link layer.
>
> Fixes: 925d046e7e52 ("RDMA/core: Add a netevent notifier to cma")
> Signed-off-by: Or Gerlitz <ogerlitz@ddn.com>
> ---
> I caught this while reviewing the RoCE netevent callback,
> the patch is compile-tested only..
> ---
> drivers/infiniband/core/cma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Looks correct to me.
Thanks,
Reviewed-by: Leon Romanovsky <leon@kernel.org>
prev parent reply other threads:[~2026-06-17 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 11:21 [PATCH] RDMA/cma: Fix hardware address comparison length in netevent callback Or Gerlitz via B4 Relay
2026-06-17 13:34 ` Leon Romanovsky [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=20260617133429.GA327369@unreal \
--to=leon@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=markzhang@nvidia.com \
--cc=ogerlitz@ddn.com \
--cc=phaddad@nvidia.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