public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.1.y 6.6.y 0/3] mm/filemap: fix page cache corruption with large folios
@ 2024-10-01 21:06 Kairui Song
  2024-10-01 21:06 ` [PATCH 6.1.y 6.6.y 1/3] mm/filemap: return early if failed to allocate memory for split Kairui Song
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Kairui Song @ 2024-10-01 21:06 UTC (permalink / raw)
  To: stable, Greg KH
  Cc: Matthew Wilcox, Jens Axboe, David Howells, Dave Chinner,
	Christian Theune, Christian Brauner, Chris Mason, Sam James,
	Daniel Dao, Linus Torvalds, Kairui Song

From: Kairui Song <kasong@tencent.com>

This series fixes the page cache corruption issue reported by Christian
Theune [1]. The issue was reported affects kernels back to 5.19.
Current maintained effected branches includes 6.1 and 6.6 and the fix
was included in 6.10 already.

This series can be applied for both 6.1 and 6.6.

Patch 3/3 is the fixing patch. It was initially submitted and merge as
an optimization but found to have fixed the corruption by handling race
correctly.

Patch 1/3 and 2/3 is required for 3/3.

Patch 3/3 included some unit test code, making the LOC of the backport a
bit higher, but should be OK to be kept, since they are just test code.

Note there seems still some unresolved problem in Link [1] but that
should be a different issue, and the commits being backported have been
well tested, they fix the corruption issue just fine.

Link: https://lore.kernel.org/linux-mm/A5A976CB-DB57-4513-A700-656580488AB6@flyingcircus.io/ [1]

Kairui Song (3):
  mm/filemap: return early if failed to allocate memory for split
  lib/xarray: introduce a new helper xas_get_order
  mm/filemap: optimize filemap folio adding

 include/linux/xarray.h |  6 +++
 lib/test_xarray.c      | 93 ++++++++++++++++++++++++++++++++++++++++++
 lib/xarray.c           | 49 ++++++++++++++--------
 mm/filemap.c           | 50 ++++++++++++++++++-----
 4 files changed, 169 insertions(+), 29 deletions(-)

-- 
2.46.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-03-25 11:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 21:06 [PATCH 6.1.y 6.6.y 0/3] mm/filemap: fix page cache corruption with large folios Kairui Song
2024-10-01 21:06 ` [PATCH 6.1.y 6.6.y 1/3] mm/filemap: return early if failed to allocate memory for split Kairui Song
2025-03-22 21:51   ` Sasha Levin
2024-10-01 21:06 ` [PATCH 6.1.y 6.6.y 2/3] lib/xarray: introduce a new helper xas_get_order Kairui Song
2025-03-22 21:51   ` Sasha Levin
2024-10-01 21:06 ` [PATCH 6.1.y 6.6.y 3/3] mm/filemap: optimize filemap folio adding Kairui Song
2025-03-22 21:50   ` Sasha Levin
2024-10-02  9:58 ` [PATCH 6.1.y 6.6.y 0/3] mm/filemap: fix page cache corruption with large folios Greg KH
2025-03-22 12:16 ` Yafang Shao
2025-03-22 15:53   ` Linus Torvalds
2025-03-23 11:18     ` Christian Theune
2025-03-23 13:20     ` Yafang Shao
2025-03-24  3:02     ` [PATCH 6.1.y] Revert "xfs: Support large folios" Yafang Shao
2025-03-24 15:40       ` Greg KH
2025-03-25 11:33       ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox