[moderation] [mm?] KCSAN: data-race in __filemap_remove_folio / evict_folios

0 views
Skip to first unread message

syzbot

unread,
6:27 AM (10 hours ago) 6:27 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f824272b6e3f Merge tag 's390-6.18-4' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=173df60a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d2e0bc0ae94545f7
dashboard link: https://syzkaller.appspot.com/bug?extid=a4f4aec3181aedb67dcd
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [ak...@linux-foundation.org baoli...@linux.alibaba.com hu...@google.com linux-...@vger.kernel.org linu...@kvack.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e9105eed99bb/disk-f824272b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/30c17f56599c/vmlinux-f824272b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3d6fe899c827/bzImage-f824272b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a4f4ae...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __filemap_remove_folio / evict_folios

write to 0xffffea00046be218 of 8 bytes by task 8579 on cpu 1:
page_cache_delete mm/filemap.c:144 [inline]
__filemap_remove_folio+0x1a5/0x2a0 mm/filemap.c:227
filemap_remove_folio+0x6d/0x1d0 mm/filemap.c:256
truncate_inode_folio+0x42/0x50 mm/truncate.c:176
shmem_undo_range+0x244/0xa80 mm/shmem.c:1116
shmem_truncate_range mm/shmem.c:1232 [inline]
shmem_fallocate+0x2bb/0x840 mm/shmem.c:3687
vfs_fallocate+0x3b6/0x400 fs/open.c:342
madvise_remove mm/madvise.c:1049 [inline]
madvise_vma_behavior+0x1920/0x1cf0 mm/madvise.c:1346
madvise_walk_vmas mm/madvise.c:1669 [inline]
madvise_do_behavior+0x5b7/0x970 mm/madvise.c:1885
do_madvise+0x10e/0x190 mm/madvise.c:1978
__do_sys_madvise mm/madvise.c:1987 [inline]
__se_sys_madvise mm/madvise.c:1985 [inline]
__x64_sys_madvise+0x64/0x80 mm/madvise.c:1985
x64_sys_call+0x1f1a/0x3000 arch/x86/include/generated/asm/syscalls_64.h:29
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffea00046be218 of 8 bytes by task 8569 on cpu 0:
folio_test_anon include/linux/page-flags.h:724 [inline]
isolate_folio mm/vmscan.c:4542 [inline]
scan_folios mm/vmscan.c:4609 [inline]
isolate_folios mm/vmscan.c:4703 [inline]
evict_folios+0x16ed/0x3590 mm/vmscan.c:4733
try_to_shrink_lruvec+0x5b5/0x950 mm/vmscan.c:4908
lru_gen_shrink_lruvec mm/vmscan.c:5057 [inline]
shrink_lruvec+0x22e/0x1b50 mm/vmscan.c:5818
shrink_node_memcgs mm/vmscan.c:6054 [inline]
shrink_node+0x686/0x2120 mm/vmscan.c:6095
shrink_zones mm/vmscan.c:6339 [inline]
do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6401
try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6729
try_charge_memcg+0x383/0xa10 mm/memcontrol.c:2356
obj_cgroup_charge_pages+0xa6/0x150 mm/memcontrol.c:2799
__memcg_kmem_charge_page+0x9f/0x170 mm/memcontrol.c:2843
__alloc_frozen_pages_noprof+0x188/0x360 mm/page_alloc.c:5200
alloc_pages_mpol+0xb3/0x260 mm/mempolicy.c:2416
alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline]
alloc_pages_noprof+0x90/0x130 mm/mempolicy.c:2507
vm_area_alloc_pages mm/vmalloc.c:3647 [inline]
__vmalloc_area_node mm/vmalloc.c:3724 [inline]
__vmalloc_node_range_noprof+0x7a5/0xed0 mm/vmalloc.c:3897
__kvmalloc_node_noprof+0x483/0x670 mm/slub.c:7134
ip_set_alloc+0x24/0x30 net/netfilter/ipset/ip_set_core.c:261
hash_netiface_create+0x282/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568
ip_set_create+0x3cc/0x970 net/netfilter/ipset/ip_set_core.c:1109
nfnetlink_rcv_msg+0x4c6/0x590 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x123/0x220 net/netlink/af_netlink.c:2552
nfnetlink_rcv+0x167/0x16c0 net/netfilter/nfnetlink.c:669
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x5c0/0x690 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg+0x145/0x180 net/socket.c:742
____sys_sendmsg+0x31e/0x4e0 net/socket.c:2630
___sys_sendmsg+0x17b/0x1d0 net/socket.c:2684
__sys_sendmsg net/socket.c:2716 [inline]
__do_sys_sendmsg net/socket.c:2721 [inline]
__se_sys_sendmsg net/socket.c:2719 [inline]
__x64_sys_sendmsg+0xd4/0x160 net/socket.c:2719
x64_sys_call+0x191e/0x3000 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888119e1a4d0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 8569 Comm: syz.7.1403 Tainted: G W syzkaller #0 PREEMPT(voluntary)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================
syz.7.1403 (8569) used greatest stack depth: 6456 bytes left


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages