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

4 views
Skip to first unread message

syzbot

unread,
Dec 11, 2023, 7:07:27 PM12/11/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a39b6ac3781d Linux 6.7-rc5
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1128adbce80000
kernel config: https://syzkaller.appspot.com/x/.config?x=d6f4b50a94fc12a6
dashboard link: https://syzkaller.appspot.com/bug?extid=bb0c5bf22f120472e6bf
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org 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/6b2ffb457ed8/disk-a39b6ac3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7108e217b8d7/vmlinux-a39b6ac3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9ed4cd6ed1b8/bzImage-a39b6ac3.xz

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

==================================================================
BUG: KCSAN: data-race in try_to_unmap_one / try_to_unmap_one

write to 0xffff88813e0cb570 of 8 bytes by task 13704 on cpu 0:
update_hiwater_rss include/linux/mm.h:2623 [inline]
try_to_unmap_one+0x835/0x1680 mm/rmap.c:1672
rmap_walk_anon+0x285/0x410 mm/rmap.c:2485
try_to_unmap+0xe9/0x110
shrink_folio_list+0xd16/0x2540 mm/vmscan.c:1252
shrink_inactive_list mm/vmscan.c:1913 [inline]
shrink_list mm/vmscan.c:2154 [inline]
shrink_lruvec+0xd80/0x17a0 mm/vmscan.c:5626
shrink_node_memcgs mm/vmscan.c:5812 [inline]
shrink_node+0xab3/0x15c0 mm/vmscan.c:5847
shrink_zones mm/vmscan.c:6086 [inline]
do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6148
try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6463
try_charge_memcg+0x280/0xd30 mm/memcontrol.c:2742
try_charge mm/memcontrol.c:2884 [inline]
charge_memcg mm/memcontrol.c:7210 [inline]
__mem_cgroup_charge+0x63/0xf0 mm/memcontrol.c:7225
mem_cgroup_charge include/linux/memcontrol.h:684 [inline]
shmem_alloc_and_add_folio mm/shmem.c:1662 [inline]
shmem_get_folio_gfp+0x44e/0xb40 mm/shmem.c:2037
shmem_get_folio mm/shmem.c:2119 [inline]
shmem_fallocate+0x582/0x860 mm/shmem.c:3136
vfs_fallocate+0x378/0x3e0 fs/open.c:324
ksys_fallocate fs/open.c:347 [inline]
__do_sys_fallocate fs/open.c:355 [inline]
__se_sys_fallocate fs/open.c:353 [inline]
__x64_sys_fallocate+0x79/0xc0 fs/open.c:353
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88813e0cb570 of 8 bytes by task 13694 on cpu 1:
update_hiwater_rss include/linux/mm.h:2622 [inline]
try_to_unmap_one+0x814/0x1680 mm/rmap.c:1672
rmap_walk_anon+0x285/0x410 mm/rmap.c:2485
try_to_unmap+0xe9/0x110
shrink_folio_list+0xd16/0x2540 mm/vmscan.c:1252
shrink_inactive_list mm/vmscan.c:1913 [inline]
shrink_list mm/vmscan.c:2154 [inline]
shrink_lruvec+0xd80/0x17a0 mm/vmscan.c:5626
shrink_node_memcgs mm/vmscan.c:5812 [inline]
shrink_node+0xab3/0x15c0 mm/vmscan.c:5847
shrink_zones mm/vmscan.c:6086 [inline]
do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6148
try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6463
try_charge_memcg+0x280/0xd30 mm/memcontrol.c:2742
obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3255
__memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3281
__alloc_pages+0x1bb/0x340 mm/page_alloc.c:4585
alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
alloc_pages+0xe0/0x100 mm/mempolicy.c:2204
vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
__vmalloc_area_node mm/vmalloc.c:3139 [inline]
__vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3320
kvmalloc_node+0x121/0x160 mm/util.c:642
kvmalloc include/linux/slab.h:738 [inline]
xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
do_replace net/ipv4/netfilter/arp_tables.c:970 [inline]
do_arpt_set_ctl+0x634/0x13b0 net/ipv4/netfilter/arp_tables.c:1421
nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1426
tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3724
sock_common_setsockopt+0x61/0x70 net/core/sock.c:3711
do_sock_setsockopt net/socket.c:2311 [inline]
__sys_setsockopt+0x1d4/0x240 net/socket.c:2334
__do_sys_setsockopt net/socket.c:2343 [inline]
__se_sys_setsockopt net/socket.c:2340 [inline]
__x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000000085e -> 0x000000000000091e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 13694 Comm: syz-executor.0 Not tainted 6.7.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
syz-executor.0 (13694) used greatest stack depth: 8760 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

syzbot

unread,
Jan 28, 2024, 1:55:14 AMJan 28
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages