Skip to contentSkip to conversation

FAILED: patch "[PATCH] io_uring/kbuf: fix missing BUF_MORE for incremental buffers" failed to apply to 6.12-stable tree

PATCH [email protected] 2 participants 2 messages Mar 20

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 3ecd3e03144b38a21a3b70254f1b9d2e16629b09
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026032008-prologue-sarcastic-de41@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 3ecd3e03144b38a21a3b70254f1b9d2e16629b09 Mon Sep 17 00:00:00 2001
From: Jens Axboe <[email protected]>
Date: Thu, 19 Mar 2026 14:29:09 -0600
Subject: [PATCH] io_uring/kbuf: fix missing BUF_MORE for incremental buffers
at EOF

For a zero length transfer, io_kbuf_inc_commit() is called with !len. Since we never enter the while loop to consume the buffers, io_kbuf_inc_commit() ends up returning true, consuming the buffer. But if no data was consumed, by definition it cannot have consumed the buffer. Return false for that case.

Fixes ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
io_uring/kbuf.c +4 -0
index e7f444953dfb..a4cb6752b7aa 100644
@@ -34,6 +34,10 @@ struct io_provide_buf {
 
 static bool io_kbuf_inc_commit(struct io_buffer_list *bl, int len)
 {
+	/* No data consumed, return false early to avoid consuming the buffer */
+	if (!len)
+		return false;
+
 	while (len) {
 		struct io_uring_buf *buf;
 		u32 buf_len, this_len;
maintainer
#1 lore raw
Quoted 5 lines · On 3/20/26 11:34 AM, [email protected] wrote:

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Same on this, fine to drop for 6.12.

Signature · 1 line
Jens Axboe