syzbot


KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 (2)

Status: auto-closed as invalid on 2022/09/21 17:08
Subsystems: kernel
[Documentation on labels]
First crash: 840d, last: 840d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 (5) kernel 1 13d 13d 0/28 moderation: reported on 2024/11/22 00:23
upstream KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 kernel 1 946d 946d 0/28 auto-closed as invalid on 2022/06/07 09:14
upstream KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 (4) kernel 1 62d 62d 0/28 auto-obsoleted due to no activity on 2024/11/07 19:03
upstream KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64 (3) kernel 1 97d 97d 0/28 auto-obsoleted due to no activity on 2024/10/03 14:19

Sample crash report:
==================================================================
BUG: KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64

read-write to 0xffffffff85c079c0 of 8 bytes by interrupt on cpu 1:
 tick_do_update_jiffies64+0x112/0x1b0 kernel/time/tick-sched.c:118
 tick_sched_do_timer kernel/time/tick-sched.c:199 [inline]
 tick_sched_timer+0x7e/0x2d0 kernel/time/tick-sched.c:1473
 __run_hrtimer+0x132/0x420 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_interrupt+0x36e/0xa70 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0xa3/0x250 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x88/0xb0 arch/x86/kernel/apic/apic.c:1106
 asm_sysvec_apic_timer_interrupt+0x16/0x20
 ext4_es_unregister_shrinker+0x0/0x50 include/trace/events/ext4.h:2328
 __ext4_fill_super fs/ext4/super.c:5463 [inline]
 ext4_fill_super+0x3af7/0x5000 fs/ext4/super.c:5517
 get_tree_bdev+0x2b4/0x3b0 fs/super.c:1323
 ext4_get_tree+0x18/0x20 fs/ext4/super.c:5547
 vfs_get_tree+0x49/0x190 fs/super.c:1530
 do_new_mount+0x200/0x650 fs/namespace.c:3040
 path_mount+0x4ad/0xbb0 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x281/0x2d0 fs/namespace.c:3568
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffffff85c079c0 of 8 bytes by task 56 on cpu 0:
 __mem_cgroup_flush_stats mm/memcontrol.c:648 [inline]
 flush_memcg_stats_dwork+0x55/0x110 mm/memcontrol.c:668
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

value changed: 0x0000000100000309 -> 0x000000010000030a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 56 Comm: kworker/u4:3 Not tainted 5.19.0-syzkaller-13930-g7ebfc85e2cd7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Workqueue: events_unbound flush_memcg_stats_dwork
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/17 17:02 upstream 7ebfc85e2cd7 4e72d229 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in flush_memcg_stats_dwork / tick_do_update_jiffies64
* Struck through repros no longer work on HEAD.