All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Chuck Lever" <cel@kernel.org>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH 5/5] SUNRPC: Set up the servername before the transport is created
Date: Wed, 04 Nov 2026 17:54:10 +0000	[thread overview]
Message-ID: <sashiko-outbox-197799@kernel.org> (raw)
In-Reply-To: <20261104-liange-v1-5-f097e10cea1b@kernel.org>

> xprt_create_transport() checks the servername length and copies the
> string only after the class setup() routine has returned. A
> backchannel setup() routine publishes the new transport in the
> svc_xprt's xpt_bc_xprt field before it returns, and svc_xprt_free()
> puts that pointer when the svc_xprt goes away. When the length
> check or the kstrdup() then fails, xprt_create_transport() calls
> xprt_destroy(), which ignores the reference count and frees the
> transport. xpt_bc_xprt is left pointing at freed memory, and
> svc_xprt_free() later puts a dangling reference.
> 
> The setup() routines never read the servername, so validate and
> duplicate it before the transport is created. After the change, no
> failure remains between setup() and the return, and the
> xprt_destroy() calls on the error path go away with it.
> 
> Fixes: 4e0038b6b246 ("SUNRPC: Move clnt->cl_server into struct rpc_xprt")
> Cc: stable@vger.kernel.org
> Signed-off-by: Chuck Lever <cel@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-liange-v1-0-f097e10cea1b@kernel.org?part=5


      reply	other threads:[~2026-11-04 17:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 17:49 [PATCH 0/5] SUNRPC: Fix backchannel transport lifetime bugs Chuck Lever
2026-11-04 17:49 ` [PATCH 1/5] SUNRPC: Reject add_xprt on a backchannel xprt_switch Chuck Lever
2026-11-04 17:59   ` sashiko-bot
2026-11-04 17:49 ` [PATCH 2/5] svcrdma: drop the extra reference on the backchannel transport Chuck Lever
2026-11-04 18:03   ` sashiko-bot
2026-11-04 17:49 ` [PATCH 3/5] svcrdma: Hold a module reference for " Chuck Lever
2026-11-04 18:04   ` sashiko-bot
2026-11-04 17:49 ` [PATCH 4/5] svcrdma: Set xprt_class on " Chuck Lever
2026-11-04 17:53   ` sashiko-bot
2026-11-04 17:49 ` [PATCH 5/5] SUNRPC: Set up the servername before the transport is created Chuck Lever
2026-11-04 17:54   ` 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-197799@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=cel@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.