All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,youling.tang@linux.dev,willy@infradead.org,tangyouling@kylinos.cn,ryan.roberts@arm.com,jack@suse.cz,david@redhat.com,chizhiling@kylinos.cn,klarasmodin@gmail.com,akpm@linux-foundation.org
Subject: [folded-merged] mm-filemap-align-last_index-to-folio-size-fix.patch removed from -mm tree
Date: Sun, 21 Sep 2025 13:06:26 -0700	[thread overview]
Message-ID: <20250921200627.8F602C4CEE7@smtp.kernel.org> (raw)


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


                 reply	other threads:[~2025-09-21 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250921200627.8F602C4CEE7@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=chizhiling@kylinos.cn \
    --cc=david@redhat.com \
    --cc=jack@suse.cz \
    --cc=klarasmodin@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=tangyouling@kylinos.cn \
    --cc=willy@infradead.org \
    --cc=youling.tang@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.