syzbot


KMSAN: uninit-value in swap_writepage

Status: upstream: reported on 2024/10/10 08:44
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+febb2473441bfb8fb380@syzkaller.appspotmail.com
First crash: 45d, last: 1d18h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KMSAN: uninit-value in swap_writepage 2 (3) 2024/10/11 15:28

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in is_folio_zero_filled mm/page_io.c:189 [inline]
BUG: KMSAN: uninit-value in swap_writepage+0x536/0x12b0 mm/page_io.c:259
 is_folio_zero_filled mm/page_io.c:189 [inline]
 swap_writepage+0x536/0x12b0 mm/page_io.c:259
 shmem_writepage+0x2117/0x2450 mm/shmem.c:1567
 pageout mm/vmscan.c:688 [inline]
 shrink_folio_list+0x5e78/0x7dd0 mm/vmscan.c:1366
 evict_folios+0x9813/0xbaf0 mm/vmscan.c:4583
 try_to_shrink_lruvec+0x13a3/0x1750 mm/vmscan.c:4778
 shrink_one+0x646/0xd20 mm/vmscan.c:4816
 shrink_many mm/vmscan.c:4879 [inline]
 lru_gen_shrink_node mm/vmscan.c:4957 [inline]
 shrink_node+0x451a/0x50f0 mm/vmscan.c:5937
 kswapd_shrink_node mm/vmscan.c:6765 [inline]
 balance_pgdat mm/vmscan.c:6957 [inline]
 kswapd+0x25e2/0x42f0 mm/vmscan.c:7226
 kthread+0x3e2/0x540 kernel/kthread.c:389
 ret_from_fork+0x6d/0x90 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Uninit was created at:
 __alloc_pages_noprof+0x9d6/0xe70 mm/page_alloc.c:4756
 alloc_pages_mpol_noprof+0x299/0x990 mm/mempolicy.c:2265
 folio_alloc_mpol_noprof+0x55/0x180 mm/mempolicy.c:2283
 shmem_alloc_folio mm/shmem.c:1774 [inline]
 shmem_alloc_and_add_folio+0xc33/0x1c30 mm/shmem.c:1813
 shmem_get_folio_gfp+0xacd/0x1f30 mm/shmem.c:2335
 shmem_get_folio mm/shmem.c:2441 [inline]
 shmem_symlink+0x528/0xa20 mm/shmem.c:3834
 vfs_symlink+0x1ed/0x460 fs/namei.c:4615
 do_symlinkat+0x257/0x8a0 fs/namei.c:4641
 __do_sys_symlink fs/namei.c:4662 [inline]
 __se_sys_symlink fs/namei.c:4660 [inline]
 __x64_sys_symlink+0xe0/0x140 fs/namei.c:4660
 x64_sys_call+0x30e8/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:89
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 UID: 0 PID: 80 Comm: kswapd0 Tainted: G        W          6.12.0-rc1-syzkaller-00330-gfc20a3e57247 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
=====================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/06 08:42 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in swap_writepage
2024/11/19 12:01 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in swap_writepage
* Struck through repros no longer work on HEAD.