From: Jens Axboe <axboe@kernel.dk>
To: "Lai, Yi" <yi1.lai@linux.intel.com>
Cc: io-uring <io-uring@vger.kernel.org>, yi1.lai@intel.com
Subject: Re: [PATCH] io_uring: rename "copy buffers" to "clone buffers"
Date: Wed, 16 Oct 2024 07:08:10 -0600 [thread overview]
Message-ID: <5739f382-5a94-4428-82a3-5271afd26dd6@kernel.dk> (raw)
In-Reply-To: <b197e714-d117-491e-83e8-a6849e027e8b@kernel.dk>
On 10/15/24 8:27 PM, Jens Axboe wrote:
> Thanks, I'll take a look! A vmlinux would be handy to have, in terms of
> looking up where it's fauling without spending too much time on it. But
> if you don't have it, no worries, I'll give this a spin tomorrow.
Ah, it was just missing the dummy_ubuf check. The below should fix it,
I'll queue it up and add a test case to liburing too.
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 33a3d156a85b..6f3b6de230bd 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -1176,7 +1176,8 @@ static int io_clone_buffers(struct io_ring_ctx *ctx, struct io_ring_ctx *src_ctx
for (i = 0; i < nbufs; i++) {
struct io_mapped_ubuf *src = src_ctx->user_bufs[i];
- refcount_inc(&src->refs);
+ if (src != &dummy_ubuf)
+ refcount_inc(&src->refs);
user_bufs[i] = src;
}
--
Jens Axboe
prev parent reply other threads:[~2024-10-16 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 15:21 [PATCH] io_uring: rename "copy buffers" to "clone buffers" Jens Axboe
2024-10-16 1:57 ` Lai, Yi
2024-10-16 2:27 ` Jens Axboe
2024-10-16 13:08 ` Jens Axboe [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=5739f382-5a94-4428-82a3-5271afd26dd6@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=yi1.lai@intel.com \
--cc=yi1.lai@linux.intel.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