syzbot


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

Status: auto-obsoleted due to no activity on 2023/09/22 16:58
Subsystems: mm
[Documentation on labels]
First crash: 283d, last: 275d
Similar bugs (4)
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 59d 59d 0/26 auto-obsoleted due to no activity on 2024/04/25 15:29
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (4) mm 7 121d 160d 0/26 auto-obsoleted due to no activity on 2024/02/23 13:13
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node (2) mm 3 320d 336d 0/26 auto-obsoleted due to no activity on 2023/08/07 23:22
upstream KCSAN: data-race in do_try_to_free_pages / shrink_node mm 35 1567d 1619d 0/26 auto-closed as invalid on 2020/04/13 04:50

Sample crash report:
oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz1,mems_allowed=0,oom_memcg=/syz1,task_memcg=/syz1,task=syz-executor.1,pid=13795,uid=0
Memory cgroup out of memory: Killed process 13795 (syz-executor.1) total-vm:48608kB, anon-rss:440kB, file-rss:8320kB, shmem-rss:0kB, UID:0 pgtables:84kB oom_score_adj:1000
==================================================================
BUG: KCSAN: data-race in do_try_to_free_pages / shrink_node

write to 0xffff888104b39870 of 8 bytes by task 21706 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
 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:720 [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:3697
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3697
 __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

read to 0xffff888104b39870 of 8 bytes by task 21703 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
 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:4942 [inline]
 __handle_mm_fault mm/memory.c:5079 [inline]
 handle_mm_fault+0x9ec/0x2c10 mm/memory.c:5233
 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

value changed: 0x00000000000000fd -> 0x00000000000000fe

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21703 Comm: syz-executor.1 Not tainted 6.5.0-rc6-syzkaller-00117-g0e8860d2125f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/18 16:58 upstream 0e8860d2125f acb1ba71 .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/08/10 14:38 upstream 374a7f47bf40 da3c3ef8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in do_try_to_free_pages / shrink_node
* Struck through repros no longer work on HEAD.