Revision 9dfb3b8d655022760ca68af11821f1c63aa547c3 authored by Matthew Wilcox (Oracle) on 30 July 2022, 04:25:18 UTC, committed by Andrew Morton on 28 August 2022, 21:02:43 UTC
If we allocate a new page, we need to make sure that our folio matches
that new page.

If we do end up in this code path, we store the wrong page in the shmem
inode's page cache, and I would rather imagine that data corruption
ensues.

This will be solved by changing shmem_replace_page() to
shmem_replace_folio(), but this is the minimal fix.

Link: https://lkml.kernel.org/r/20220730042518.1264767-1-willy@infradead.org
Fixes: da08e9b79323 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent ab74ef7
History
File Mode Size
Kconfig -rw-r--r-- 5.8 KB
Makefile -rw-r--r-- 986 bytes
alarmtimer.c -rw-r--r-- 23.7 KB
clockevents.c -rw-r--r-- 19.5 KB
clocksource-wdtest.c -rw-r--r-- 5.8 KB
clocksource.c -rw-r--r-- 41.3 KB
hrtimer.c -rw-r--r-- 66.1 KB
itimer.c -rw-r--r-- 10.2 KB
jiffies.c -rw-r--r-- 2.6 KB
namespace.c -rw-r--r-- 10.4 KB
ntp.c -rw-r--r-- 28.3 KB
ntp_internal.h -rw-r--r-- 783 bytes
posix-clock.c -rw-r--r-- 5.6 KB
posix-cpu-timers.c -rw-r--r-- 44.6 KB
posix-stubs.c -rw-r--r-- 5.5 KB
posix-timers.c -rw-r--r-- 37.4 KB
posix-timers.h -rw-r--r-- 1.9 KB
sched_clock.c -rw-r--r-- 7.7 KB
test_udelay.c -rw-r--r-- 3.6 KB
tick-broadcast-hrtimer.c -rw-r--r-- 3.2 KB
tick-broadcast.c -rw-r--r-- 30.3 KB
tick-common.c -rw-r--r-- 14.7 KB
tick-internal.h -rw-r--r-- 7.9 KB
tick-legacy.c -rw-r--r-- 999 bytes
tick-oneshot.c -rw-r--r-- 3.2 KB
tick-sched.c -rw-r--r-- 39.6 KB
tick-sched.h -rw-r--r-- 3.5 KB
time.c -rw-r--r-- 22.8 KB
time_test.c -rw-r--r-- 2.0 KB
timeconst.bc -rw-r--r-- 3.0 KB
timeconv.c -rw-r--r-- 4.5 KB
timecounter.c -rw-r--r-- 2.5 KB
timekeeping.c -rw-r--r-- 71.1 KB
timekeeping.h -rw-r--r-- 983 bytes
timekeeping_debug.c -rw-r--r-- 1.3 KB
timekeeping_internal.h -rw-r--r-- 921 bytes
timer.c -rw-r--r-- 61.5 KB
timer_list.c -rw-r--r-- 8.6 KB
vsyscall.c -rw-r--r-- 4.9 KB

back to top