* + iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch added to mm-nonmm-unstable branch
@ 2025-08-12 1:04 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-08-12 1:04 UTC (permalink / raw)
To: mm-commits, viro, ryan, maximilian, dhowells, ct, brauner, arnout,
asmadeus, akpm
The patch titled
Subject: iov_iter: iov_folioq_get_pages: don't leave empty slot behind
has been added to the -mm mm-nonmm-unstable branch. Its filename is
iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Dominique Martinet <asmadeus@codewreck.org>
Subject: iov_iter: iov_folioq_get_pages: don't leave empty slot behind
Date: Mon, 11 Aug 2025 16:39:06 +0900
After advancing into a folioq it makes more sense to point to the next
slot than at the end of the current slot. This should not be needed for
correctness, but this also happens to "fix" the 9p bug with
iterate_folioq() not copying properly.
Link: https://lkml.kernel.org/r/20250811-iot_iter_folio-v1-2-d9c223adf93c@codewreck.org
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnout Engelen <arnout@bzzt.net>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christian Theune <ct@flyingcircus.io>
Cc: David Howells <dhowells@redhat.com>
Cc: Maximilian Bosch <maximilian@mbosch.me>
Cc: Ryan Lahfa <ryan@lahfa.xyz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/iov_iter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/lib/iov_iter.c~iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind
+++ a/lib/iov_iter.c
@@ -1032,9 +1032,6 @@ static ssize_t iter_folioq_get_pages(str
maxpages--;
}
- if (maxpages == 0 || extracted >= maxsize)
- break;
-
if (iov_offset >= fsize) {
iov_offset = 0;
slot++;
@@ -1043,6 +1040,9 @@ static ssize_t iter_folioq_get_pages(str
slot = 0;
}
}
+
+ if (maxpages == 0 || extracted >= maxsize)
+ break;
}
iter->count = count;
_
Patches currently in -mm which might be from asmadeus@codewreck.org are
iov_iter-iterate_folioq-fix-handling-of-offset-=-folio-size.patch
iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
^ permalink raw reply [flat|nested] 2+ messages in thread* + iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch added to mm-nonmm-unstable branch
@ 2025-08-13 23:16 Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-08-13 23:16 UTC (permalink / raw)
To: mm-commits, willy, viro, ryan, maximilian, dhowells, ct, brauner,
arnout, asmadeus, akpm
The patch titled
Subject: iov_iter: iov_folioq_get_pages: don't leave empty slot behind
has been added to the -mm mm-nonmm-unstable branch. Its filename is
iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Dominique Martinet <asmadeus@codewreck.org>
Subject: iov_iter: iov_folioq_get_pages: don't leave empty slot behind
Date: Wed, 13 Aug 2025 15:04:56 +0900
After advancing into a folioq it makes more sense to point to the next
slot than at the end of the current slot. This should not be needed for
correctness, but this also happens to "fix" the 9p bug with
iterate_folioq() not copying properly.
Link: https://lkml.kernel.org/r/20250813-iot_iter_folio-v3-0-a0ffad2b665a@codewreck.org
Link: https://lkml.kernel.org/r/20250813-iot_iter_folio-v3-2-a0ffad2b665a@codewreck.org
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Acked-by: David Howells <dhowells@redhat.com>
Tested-by: Arnout Engelen <arnout@bzzt.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Christian Theune <ct@flyingcircus.io>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Maximilian Bosch <maximilian@mbosch.me>
Cc: Ryan Lahfa <ryan@lahfa.xyz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/iov_iter.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/lib/iov_iter.c~iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind
+++ a/lib/iov_iter.c
@@ -1032,9 +1032,6 @@ static ssize_t iter_folioq_get_pages(str
maxpages--;
}
- if (maxpages == 0 || extracted >= maxsize)
- break;
-
if (iov_offset >= fsize) {
iov_offset = 0;
slot++;
@@ -1043,6 +1040,9 @@ static ssize_t iter_folioq_get_pages(str
slot = 0;
}
}
+
+ if (maxpages == 0 || extracted >= maxsize)
+ break;
}
iter->count = count;
_
Patches currently in -mm which might be from asmadeus@codewreck.org are
iov_iter-iterate_folioq-fix-handling-of-offset-=-folio-size.patch
iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-13 23:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 1:04 + iov_iter-iov_folioq_get_pages-dont-leave-empty-slot-behind.patch added to mm-nonmm-unstable branch Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2025-08-13 23:16 Andrew Morton
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.