From: sashiko-bot@kernel.org
To: "Chuck Lever" <cel@kernel.org>
Cc: linux-rdma@vger.kernel.org, "Jeff Layton" <jlayton@kernel.org>,
"Anna Schumaker" <anna@kernel.org>,
"Chuck Lever" <cel@kernel.org>
Subject: Re: [PATCH v1 5/5] svcrdma: release a receive context stranded by a partial Read post
Date: Tue, 22 Sep 2026 01:57:59 +0000 [thread overview]
Message-ID: <20260922015759.E39AB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922015128.240977-5-cel@kernel.org>
> When ib_post_send() rejects a WR mid-chain, svc_rdma_post_send_err()
> returns zero and svc_rdma_post_chunk_ctxt() reports the Read chain
> as posted. The only signaled WR in the chain is its tail, so a chain
> cut before the tail posts nothing that completes.
> svc_rdma_process_read_list() then reports the Read in progress, and
> the receive context waits for svc_rdma_wc_read_done(), which never
> runs. No list the transport destructor walks holds the context, so
> it leaks past teardown along with its rw contexts and their DMA
> mappings.
>
> The caller cannot release the context on the error, because the
> posted Read WRs still write into pages it owns. Nor can the error
> path drain the Send Queue. The drain's marker WR needs an SQ slot,
> and a provider that has just rejected a WR cannot be trusted to
> have one.
>
> Park the receive context on a per-transport list, as the Send path
> does, and release it from svc_rdma_free() after the drain and before
> the rw contexts are destroyed. svc_rdma_post_chunk_ctxt() posts only
> Read chains, so pass it the receive context itself rather than the
> embedded chunk context.
>
> Reaching this path needs a provider to reject a WR after accepting
> earlier ones in the same chain. That has not been observed.
>
> Fixes: f13193f50b64 ("svcrdma: Introduce local rdma_rw API helpers")
> Signed-off-by: Chuck Lever <cel@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922015128.240977-1-cel@kernel.org?part=5
next prev parent reply other threads:[~2026-09-22 1:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 1:51 [PATCH v1 1/5] SUNRPC: fire svc_xprt_free tracepoint before dropping the netns Chuck Lever
2026-09-22 1:51 ` [PATCH v1 2/5] SUNRPC: fire svc_defer_queue tracepoint before publishing the request Chuck Lever
2026-09-22 1:57 ` sashiko-bot
2026-09-22 1:51 ` [PATCH v1 3/5] svcrdma: fix a page leak in backchannel sends Chuck Lever
2026-09-22 1:58 ` sashiko-bot
2026-09-22 1:51 ` [PATCH v1 4/5] svcrdma: release a send context stranded by a partial post Chuck Lever
2026-09-22 1:59 ` sashiko-bot
2026-09-22 1:51 ` [PATCH v1 5/5] svcrdma: release a receive context stranded by a partial Read post Chuck Lever
2026-09-22 1:57 ` sashiko-bot [this message]
2026-09-22 1:57 ` [PATCH v1 1/5] SUNRPC: fire svc_xprt_free tracepoint before dropping the netns sashiko-bot
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=20260922015759.E39AB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=jlayton@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.