From: Greg KH <greg@kroah.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
Jeff Layton <jlayton@kernel.org>
Subject: Re: [PATCH 6.18.y 2/2] svcrdma: Clear sc_cm_id when ADDR_CHANGE replacement fails
Date: Wed, 9 Sep 2026 14:52:45 +0200 [thread overview]
Message-ID: <2026090937-animating-trace-d6da@gregkh> (raw)
In-Reply-To: <20260909002517.726510-2-sashal@kernel.org>
On Tue, Sep 08, 2026 at 08:25:17PM -0400, Sasha Levin wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> [ Upstream commit 01500306e1d50de7ca7a2cdcdfa28ac0523eb747 ]
>
> When svc_rdma_listen_handler() handles RDMA_CM_EVENT_ADDR_CHANGE,
> it creates a replacement listener cm_id and returns 1, telling
> the CM core to destroy the old one. If the replacement allocation
> fails, sc_cm_id still points at the old cm_id that the CM core is
> about to destroy. Any subsequent dereference of sc_cm_id --
> such as svc_rdma_detach()'s rdma_disconnect() call -- is a
> use-after-free.
>
> NULL sc_cm_id on the failure path and guard svc_rdma_detach()'s
> rdma_disconnect() call against NULL so that the listener can
> be torn down safely when the server shuts down.
>
> Fixes: d1b586e75ec6 ("svcrdma: Handle ADDR_CHANGE CM event properly")
> Cc: stable@vger.kernel.org
> Acked-by: Jeff Layton <jlayton@kernel.org>
> Link: https://patch.msgid.link/20260527-rdma-follow-on-v1-5-1b09bd87b6cd@oracle.com
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> [ added the missing sc_cm_id NULL guard to the existing __svc_rdma_free() cleanup worker. ]
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
Does not apply :(
prev parent reply other threads:[~2026-09-09 12:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:09 FAILED: patch "[PATCH] svcrdma: Clear sc_cm_id when ADDR_CHANGE replacement fails" failed to apply to 6.18-stable tree gregkh
2026-09-09 0:25 ` [PATCH 6.18.y 1/2] svcrdma: Add Write chunk WRs to the RPC's Send WR chain Sasha Levin
2026-09-09 0:25 ` [PATCH 6.18.y 2/2] svcrdma: Clear sc_cm_id when ADDR_CHANGE replacement fails Sasha Levin
2026-09-09 12:52 ` Greg KH [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=2026090937-animating-trace-d6da@gregkh \
--to=greg@kroah.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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