syzbot


KCSAN: data-race in do_try_to_free_pages / shrink_node (2)

Status: auto-obsoleted due to no activity on 2023/08/07 23:22
Subsystems: mm
[Documentation on labels]
First crash: 481d, last: 465d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (5) mm 1 203d 203d 0/28 auto-obsoleted due to no activity on 2024/04/25 15:29
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (6) mm 1 102d 102d 0/28 auto-obsoleted due to no activity on 2024/08/04 17:46
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (4) mm 7 265d 305d 0/28 auto-obsoleted due to no activity on 2024/02/23 13:13
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (3) mm 2 419d 427d 0/28 auto-obsoleted due to no activity on 2023/09/22 16:58
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node mm 35 1711d 1764d 0/28 auto-closed as invalid on 2020/04/13 04:50

Sample crash report:
==================================================================
BUG: KCSAN: data-race in do_try_to_free_pages / shrink_node

write to 0xffff88813750a870 of 8 bytes by task 22356 on cpu 1:
 snapshot_refaults mm/vmscan.c:6786 [inline]
 do_try_to_free_pages+0x95f/0xce0 mm/vmscan.c:6848
 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:7140
 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2695
 try_charge mm/memcontrol.c:2837 [inline]
 charge_memcg+0x51/0x200 mm/memcontrol.c:6976
 mem_cgroup_swapin_charge_folio+0xd0/0x150 mm/memcontrol.c:7032
 __read_swap_cache_async+0x2fe/0x560 mm/swap_state.c:489
 swap_cluster_readahead+0x2a3/0x4f0 mm/swap_state.c:653
 swapin_readahead+0x8d/0x700 mm/swap_state.c:861
 do_swap_page+0x4d7/0x1550 mm/memory.c:3813
 handle_pte_fault mm/memory.c:4935 [inline]
 __handle_mm_fault mm/memory.c:5072 [inline]
 handle_mm_fault+0x9ec/0x2c10 mm/memory.c:5226
 do_user_addr_fault arch/x86/mm/fault.c:1392 [inline]
 handle_page_fault arch/x86/mm/fault.c:1486 [inline]
 exc_page_fault+0x24d/0x650 arch/x86/mm/fault.c:1542
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

read to 0xffff88813750a870 of 8 bytes by task 22360 on cpu 0:
 prepare_scan_count mm/vmscan.c:2950 [inline]
 shrink_node+0x3b3/0x15c0 mm/vmscan.c:6522
 shrink_zones mm/vmscan.c:6763 [inline]
 do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6825
 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:7140
 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2695
 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3109
 __memcg_kmem_charge_page+0x1d5/0x2c0 mm/memcontrol.c:3135
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4494
 alloc_pages+0x3e1/0x4e0
 vm_area_alloc_pages mm/vmalloc.c:3059 [inline]
 __vmalloc_area_node mm/vmalloc.c:3135 [inline]
 __vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3316
 kvmalloc_node+0x121/0x160 mm/util.c:629
 kvmalloc include/linux/slab.h:717 [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+0x615/0x1390 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:1467
 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3695
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3686
 __sys_setsockopt+0x1c9/0x230 net/socket.c:2263
 __do_sys_setsockopt net/socket.c:2274 [inline]
 __se_sys_setsockopt net/socket.c:2271 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x000000000000064b -> 0x000000000000064d

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 22360 Comm: syz-executor.1 Not tainted 6.4.0-syzkaller-10207-g99bdeae21d25 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/03 23:22 upstream 99bdeae21d25 6e553898 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_try_to_free_pages / shrink_node
2023/06/26 01:32 upstream 547cc9be86f4 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_try_to_free_pages / shrink_node
2023/06/17 20:17 upstream 1b29d271614a f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_try_to_free_pages / shrink_node
* Struck through repros no longer work on HEAD.