syzbot


KCSAN: data-race in cgroup_rstat_flush_locked / cgroup_rstat_updated

Status: auto-closed as invalid on 2020/03/10 04:24
Subsystems: cgroups
[Documentation on labels]
First crash: 1550d, last: 1550d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in cgroup_rstat_flush_locked / cgroup_rstat_updated

read to 0xffffe8ffffda6e48 of 8 bytes by task 7944 on cpu 1:
 cgroup_rstat_updated+0xa8/0x1e0 kernel/cgroup/rstat.c:46
 cgroup_base_stat_cputime_account_end.isra.0+0x26/0x70 kernel/cgroup/rstat.c:365
 __cgroup_account_cputime+0x7f/0x90 kernel/cgroup/rstat.c:375
 cgroup_account_cputime include/linux/cgroup.h:778 [inline]
 update_curr+0x104/0x1d0 kernel/sched/fair.c:860
 dequeue_entity+0x1e/0x3e0 kernel/sched/fair.c:4083
 dequeue_task_fair+0x50/0x780 kernel/sched/fair.c:5316
 dequeue_task kernel/sched/core.c:1315 [inline]
 deactivate_task+0x99/0x100 kernel/sched/core.c:1335
 __schedule+0x103/0x690 kernel/sched/core.c:4041
 schedule+0x4a/0x100 kernel/sched/core.c:4155
 freezable_schedule include/linux/freezer.h:172 [inline]
 do_nanosleep+0x138/0x320 kernel/time/hrtimer.c:1874
 hrtimer_nanosleep+0x191/0x320 kernel/time/hrtimer.c:1927
 __do_sys_nanosleep kernel/time/hrtimer.c:1961 [inline]
 __se_sys_nanosleep kernel/time/hrtimer.c:1948 [inline]
 __x64_sys_nanosleep+0x106/0x150 kernel/time/hrtimer.c:1948
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffffe8ffffda6e48 of 8 bytes by task 6381 on cpu 0:
 cgroup_rstat_cpu_pop_updated kernel/cgroup/rstat.c:135 [inline]
 cgroup_rstat_flush_locked+0x25d/0x7c0 kernel/cgroup/rstat.c:165
 cgroup_rstat_flush+0x30/0x50 kernel/cgroup/rstat.c:207
 blkcg_print_stat+0x5a/0x640 block/blk-cgroup.c:747
 cgroup_seqfile_show+0x78/0x130 kernel/cgroup/cgroup.c:3760
 kernfs_seq_show+0xaa/0xe0 fs/kernfs/file.c:167
 seq_read+0x350/0x9d0 fs/seq_file.c:229
 kernfs_fop_read+0xa2/0x350 fs/kernfs/file.c:251
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_loop_readv_writev fs/read_write.c:701 [inline]
 do_iter_read+0x357/0x3d0 fs/read_write.c:935
 vfs_readv+0x9c/0xf0 fs/read_write.c:997
 kernel_readv fs/splice.c:365 [inline]
 default_file_splice_read+0x358/0x590 fs/splice.c:422
 do_splice_to+0xf2/0x130 fs/splice.c:892
 splice_direct_to_actor+0x1b6/0x540 fs/splice.c:971
 do_splice_direct+0x161/0x1e0 fs/splice.c:1080
 do_sendfile+0x384/0x7f0 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x12a/0x140 fs/read_write.c:1511
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6381 Comm: syz-executor.5 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/31 04:16 https://github.com/google/ktsan.git kcsan 245a43005292 6b36d338 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.