syzbot


KCSAN: data-race in __refill_stock / drain_all_stock

Status: auto-obsoleted due to no activity on 2023/06/05 19:27
Subsystems: cgroups mm
[Documentation on labels]
First crash: 668d, last: 637d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __refill_stock / drain_all_stock (2) cgroups mm 119 302d 416d 0/28 auto-obsoleted due to no activity on 2024/05/05 08:01

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __refill_stock / drain_all_stock

read-write to 0xffff888237c2a4f0 of 4 bytes by task 27132 on cpu 0:
 __refill_stock+0x7c/0xb0 mm/memcontrol.c:2346
 refill_stock mm/memcontrol.c:2357 [inline]
 obj_cgroup_uncharge_pages+0xfb/0x1a0 mm/memcontrol.c:3117
 __memcg_kmem_uncharge_page+0x53/0x100 mm/memcontrol.c:3190
 free_pages_prepare mm/page_alloc.c:1292 [inline]
 free_unref_page_prepare+0x65/0x2a0 mm/page_alloc.c:2555
 free_unref_page+0x34/0x170 mm/page_alloc.c:2650
 vfree+0x27c/0x420 mm/vmalloc.c:2798
 __vmalloc_area_node mm/vmalloc.c:3140 [inline]
 __vmalloc_node_range+0xdf0/0xeb0 mm/vmalloc.c:3257
 kvmalloc_node+0x121/0x160 mm/util.c:629
 kvmalloc include/linux/slab.h:697 [inline]
 xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
 do_replace net/ipv6/netfilter/ip6_tables.c:1139 [inline]
 do_ip6t_set_ctl+0x614/0x17d0 net/ipv6/netfilter/ip6_tables.c:1636
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x11c/0x130 net/ipv6/ipv6_sockglue.c:1017
 rawv6_setsockopt+0x21e/0x410 net/ipv6/raw.c:1053
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3663
 __sys_setsockopt+0x1c3/0x230 net/socket.c:2273
 __do_sys_setsockopt net/socket.c:2284 [inline]
 __se_sys_setsockopt net/socket.c:2281 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2281
 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 0xffff888237c2a4f0 of 4 bytes by task 27127 on cpu 1:
 drain_all_stock+0xd3/0x2d0 mm/memcontrol.c:2387
 try_charge_memcg+0x6c2/0xd20 mm/memcontrol.c:2732
 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3138
 __memcg_kmem_charge_page+0x1d5/0x2c0 mm/memcontrol.c:3164
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4776
 alloc_pages+0x3e1/0x4e0
 vm_area_alloc_pages mm/vmalloc.c:3009 [inline]
 __vmalloc_area_node mm/vmalloc.c:3085 [inline]
 __vmalloc_node_range+0x6d2/0xeb0 mm/vmalloc.c:3257
 kvmalloc_node+0x121/0x160 mm/util.c:629
 kvmalloc include/linux/slab.h:697 [inline]
 xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
 do_replace net/ipv6/netfilter/ip6_tables.c:1139 [inline]
 do_ip6t_set_ctl+0x614/0x17d0 net/ipv6/netfilter/ip6_tables.c:1636
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x11c/0x130 net/ipv6/ipv6_sockglue.c:1017
 rawv6_setsockopt+0x21e/0x410 net/ipv6/raw.c:1053
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3663
 __sys_setsockopt+0x1c3/0x230 net/socket.c:2273
 __do_sys_setsockopt net/socket.c:2284 [inline]
 __se_sys_setsockopt net/socket.c:2281 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2281
 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: 0x00000025 -> 0x00000023

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27127 Comm: syz-executor.5 Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 19:18 upstream 58390c8ce1bd 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __refill_stock / drain_all_stock
2023/04/25 20:35 upstream 173ea743bf7a 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __refill_stock / drain_all_stock
2023/04/22 15:04 upstream 8e41e0a57566 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __refill_stock / drain_all_stock
2023/04/18 02:12 upstream 6a8f57ae2eb0 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __refill_stock / drain_all_stock
2023/03/31 20:02 upstream 62bad54b26db f325deb0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __refill_stock / drain_all_stock
* Struck through repros no longer work on HEAD.