* [folded-merged] mm-filemap-align-last_index-to-folio-size-fix.patch removed from -mm tree
@ 2025-09-21 20:06 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-21 20:06 UTC (permalink / raw)
To: mm-commits, youling.tang, willy, tangyouling, ryan.roberts, jack,
david, chizhiling, klarasmodin, akpm
The quilt patch titled
Subject: mm-filemap-align-last_index-to-folio-size-fix
has been removed from the -mm tree. Its filename was
mm-filemap-align-last_index-to-folio-size-fix.patch
This patch was dropped because it was folded into mm-filemap-align-last_index-to-folio-size.patch
------------------------------------------------------
From: Klara Modin <klarasmodin@gmail.com>
Subject: mm-filemap-align-last_index-to-folio-size-fix
Date: Tue, 15 Jul 2025 00:34:12 +0200
fix overflow on 32-bit
iocb->ki_pos is loff_t (long long) while pgoff_t is unsigned long and
this overflow seems to happen in practice, resulting in last_index being
before index.
Link: https://lkml.kernel.org/r/yru7qf5gvyzccq5ohhpylvxug5lr5tf54omspbjh4sm6pcdb2r@fpjgj2pxw7va
Signed-off-by: Klara Modin <klarasmodin@gmail.com>
Cc: Chi Zhiling <chizhiling@kylinos.cn>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Youling Tang <tangyouling@kylinos.cn>
Cc: Youling Tang <youling.tang@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/filemap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/filemap.c~mm-filemap-align-last_index-to-folio-size-fix
+++ a/mm/filemap.c
@@ -2601,8 +2601,8 @@ static int filemap_get_pages(struct kioc
int err = 0;
/* "last_index" is the index of the folio beyond the end of the read */
- last_index = round_up(iocb->ki_pos + count, mapping_min_folio_nrbytes(mapping));
- last_index >>= PAGE_SHIFT;
+ last_index = round_up(iocb->ki_pos + count,
+ mapping_min_folio_nrbytes(mapping)) >> PAGE_SHIFT;
retry:
if (fatal_signal_pending(current))
return -EINTR;
_
Patches currently in -mm which might be from klarasmodin@gmail.com are
mm-filemap-align-last_index-to-folio-size.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-21 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 20:06 [folded-merged] mm-filemap-align-last_index-to-folio-size-fix.patch removed from -mm tree 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.