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

0 views
Skip to first unread message

syzbot

unread,
Jun 11, 2024, 5:35:30 PMJun 11
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 83a7eefedc9b Linux 6.10-rc3
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15be4f96980000
kernel config: https://syzkaller.appspot.com/x/.config?x=68336ea4b6f4fc09
dashboard link: https://syzkaller.appspot.com/bug?extid=25fcec4db5ad6d0e4e4c
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/dc4448d7f810/disk-83a7eefe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d1b7e727f29b/vmlinux-83a7eefe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/470dd9374113/bzImage-83a7eefe.xz

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

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

read to 0xffff888115d70628 of 8 bytes by task 20079 on cpu 0:
update_hiwater_rss include/linux/mm.h:2695 [inline]
try_to_unmap_one+0x80e/0x1650 mm/rmap.c:1779
rmap_walk_anon+0x28f/0x440 mm/rmap.c:2605
try_to_unmap+0xe9/0x110
shrink_folio_list+0xf83/0x2560 mm/vmscan.c:1278
shrink_inactive_list mm/vmscan.c:1944 [inline]
shrink_list mm/vmscan.c:2179 [inline]
shrink_lruvec+0xbd9/0x15f0 mm/vmscan.c:5703
shrink_node_memcgs mm/vmscan.c:5889 [inline]
shrink_node+0x9d1/0x13c0 mm/vmscan.c:5924
shrink_zones mm/vmscan.c:6168 [inline]
do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6230
try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6545
try_charge_memcg+0x27a/0xcd0 mm/memcontrol.c:2944
try_charge mm/memcontrol.c:3092 [inline]
charge_memcg mm/memcontrol.c:7495 [inline]
__mem_cgroup_charge+0x63/0x100 mm/memcontrol.c:7510
mem_cgroup_charge include/linux/memcontrol.h:691 [inline]
folio_prealloc mm/memory.c:1056 [inline]
wp_page_copy mm/memory.c:3291 [inline]
do_wp_page+0x64a/0x22b0 mm/memory.c:3683
handle_pte_fault mm/memory.c:5396 [inline]
__handle_mm_fault mm/memory.c:5523 [inline]
handle_mm_fault+0xb9b/0x2a80 mm/memory.c:5688
do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65
copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline]
copy_to_user_iter lib/iov_iter.c:25 [inline]
iterate_iovec include/linux/iov_iter.h:51 [inline]
iterate_and_advance2 include/linux/iov_iter.h:247 [inline]
iterate_and_advance include/linux/iov_iter.h:271 [inline]
_copy_to_iter+0x2c5/0xaf0 lib/iov_iter.c:185
copy_page_to_iter+0x171/0x2b0 lib/iov_iter.c:362
process_vm_rw_pages mm/process_vm_access.c:45 [inline]
process_vm_rw_single_vec mm/process_vm_access.c:118 [inline]
process_vm_rw_core mm/process_vm_access.c:216 [inline]
process_vm_rw+0x5f0/0x8c0 mm/process_vm_access.c:284
__do_sys_process_vm_readv mm/process_vm_access.c:296 [inline]
__se_sys_process_vm_readv mm/process_vm_access.c:292 [inline]
__x64_sys_process_vm_readv+0x7a/0x90 mm/process_vm_access.c:292
x64_sys_call+0x2597/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:311
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888115d70628 of 8 bytes by task 20077 on cpu 1:
update_hiwater_rss include/linux/mm.h:2696 [inline]
try_to_unmap_one+0x82f/0x1650 mm/rmap.c:1779
rmap_walk_anon+0x28f/0x440 mm/rmap.c:2605
try_to_unmap+0xe9/0x110
shrink_folio_list+0xf83/0x2560 mm/vmscan.c:1278
shrink_inactive_list mm/vmscan.c:1944 [inline]
shrink_list mm/vmscan.c:2179 [inline]
shrink_lruvec+0xbd9/0x15f0 mm/vmscan.c:5703
shrink_node_memcgs mm/vmscan.c:5889 [inline]
shrink_node+0x9d1/0x13c0 mm/vmscan.c:5924
shrink_zones mm/vmscan.c:6168 [inline]
do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6230
try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6545
try_charge_memcg+0x27a/0xcd0 mm/memcontrol.c:2944
obj_cgroup_charge_pages+0xbd/0x1d0 mm/memcontrol.c:3416
__memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:3442
__alloc_pages_noprof+0x1bc/0x360 mm/page_alloc.c:4695
alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2265
alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2336
vm_area_alloc_pages mm/vmalloc.c:3566 [inline]
__vmalloc_area_node mm/vmalloc.c:3642 [inline]
__vmalloc_node_range_noprof+0x719/0xef0 mm/vmalloc.c:3823
kvmalloc_node_noprof+0x121/0x170 mm/util.c:659
ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:255
hash_netiface_create+0x273/0x730 net/netfilter/ipset/ip_set_hash_gen.h:1568
ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1103
nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2564
nfnetlink_rcv+0x16c/0x15b0 net/netfilter/nfnetlink.c:664
netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361
netlink_sendmsg+0x5ca/0x6e0 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x140/0x180 net/socket.c:745
____sys_sendmsg+0x312/0x410 net/socket.c:2585
___sys_sendmsg net/socket.c:2639 [inline]
__sys_sendmsg+0x1e9/0x280 net/socket.c:2668
__do_sys_sendmsg net/socket.c:2677 [inline]
__se_sys_sendmsg net/socket.c:2675 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2675
x64_sys_call+0xb25/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000869 -> 0x00000000000009d3

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20077 Comm: syz-executor.3 Tainted: G W 6.10.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================


---
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