syzbot


KCSAN: data-race in drain_all_stock / try_charge_memcg (2)

Status: moderation: reported on 2023/12/08 00:06
Subsystems: cgroups mm
[Documentation on labels]
Reported-by: syzbot+b09c782ee8ecf3b7ce5a@syzkaller.appspotmail.com
First crash: 773d, last: 18h15m
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drain_all_stock / try_charge_memcg cgroups mm 1 843d 843d 0/26 auto-closed as invalid on 2021/12/07 05:48

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

write to 0xffff888237c2a690 of 4 bytes by task 10058 on cpu 0:
 consume_stock mm/memcontrol.c:2322 [inline]
 try_charge_memcg+0xb46/0xd20 mm/memcontrol.c:2743
 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301
 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584
 __alloc_pages_node include/linux/gfp.h:238 [inline]
 alloc_pages_node include/linux/gfp.h:261 [inline]
 bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline]
 bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170
 ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204
 map_create+0x713/0xa40 kernel/bpf/syscall.c:1237
 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5439
 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5559 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5559
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888237c2a690 of 4 bytes by task 10055 on cpu 1:
 drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2430
 try_charge_memcg+0x6c2/0xd20 mm/memcontrol.c:2790
 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301
 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584
 __alloc_pages_node include/linux/gfp.h:238 [inline]
 alloc_pages_node include/linux/gfp.h:261 [inline]
 bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:122 [inline]
 bpf_ringbuf_alloc+0xba/0x2f0 kernel/bpf/ringbuf.c:170
 ringbuf_map_alloc+0x167/0x1d0 kernel/bpf/ringbuf.c:204
 map_create+0x713/0xa40 kernel/bpf/syscall.c:1237
 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5439
 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5559 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5559
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000036 -> 0x0000001b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 10055 Comm: syz-executor.4 Not tainted 6.8.0-rc5-syzkaller-00121-g1c892cdd8fe0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (176):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/23 03:36 upstream 1c892cdd8fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/17 19:30 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/16 19:49 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/15 02:43 upstream 8d3dea210042 d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/14 20:16 upstream 7e90b5c295ec d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/13 15:51 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/06 13:57 upstream 99bd3cb0d12e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/02 01:46 upstream 5c24e4e9e708 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/01 01:47 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/29 21:41 upstream 41bccc98fb79 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/28 10:35 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/27 10:23 upstream 3a5879d495b2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/22 15:14 upstream 6613476e225e 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/22 09:03 upstream 4fbbed787267 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/20 01:26 upstream 9d1694dc91ce 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/16 12:14 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/13 07:35 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/11 01:01 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/10 03:05 upstream 35f11a3710cd b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/04 06:32 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/01 13:12 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/01 08:05 upstream 2639772a11c8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/28 06:31 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/26 19:40 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/24 12:42 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/24 09:25 upstream 3f82f1c3a036 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/23 17:46 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/22 14:33 upstream 24e0d2e527a3 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/22 00:08 upstream 9a6b294ab496 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/18 01:28 upstream 0e389834672c 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/14 03:33 upstream 5bd7ef53ffe5 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/13 01:18 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/12 12:06 upstream 26aff849438c ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/09 08:11 upstream f2e8a57ee903 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/05 21:17 upstream bee0e7762ad2 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/04 16:16 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 18:02 upstream 3b47bc037bd4 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 13:47 upstream 18d46e76d7c2 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 00:21 upstream 18d46e76d7c2 1adfb6f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/27 03:31 upstream d2da77f431ac 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/22 16:50 upstream c2d5304e6c64 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/19 01:12 upstream 23dfa043f6d5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/17 07:06 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/11 18:14 upstream 3ca112b71f35 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/11 01:03 upstream ac347a0655db d80eec66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/09 03:04 upstream 6bc986ab839c 4862372a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/07 20:39 upstream be3ca57cfb77 83211397 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/06 20:41 upstream d2f51b3516da 78fae24e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/04 05:10 upstream 6bdfe2d88b9f 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2022/01/11 15:57 upstream fe8152b38d3a 1884f55a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
* Struck through repros no longer work on HEAD.