syzbot


KCSAN: data-race in __remove_hrtimer / hrtimer_active (3)

Status: auto-closed as invalid on 2020/02/20 07:07
Subsystems: kernel
[Documentation on labels]
First crash: 1610d, last: 1605d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __remove_hrtimer / hrtimer_active kernel 1 1665d 1665d 0/26 closed as invalid on 2019/10/18 14:11
upstream KCSAN: data-race in __remove_hrtimer / hrtimer_active (2) kernel 1 1639d 1639d 0/26 closed as invalid on 2019/11/19 14:04

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __remove_hrtimer / hrtimer_active

read to 0xffff88811226d248 of 1 bytes by task 10597 on cpu 0:
 hrtimer_active+0x5e/0x1a0 kernel/time/hrtimer.c:1445
 hrtimer_try_to_cancel+0x3c/0x260 kernel/time/hrtimer.c:1160
 hrtimer_cancel+0x20/0x50 kernel/time/hrtimer.c:1275
 kvm_free_lapic+0x45/0x160 arch/x86/kvm/lapic.c:2050
 kvm_arch_vcpu_uninit+0x4c/0x120 arch/x86/kvm/x86.c:9436
 kvm_vcpu_uninit+0x36/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:373
 vmx_free_vcpu+0x11c/0x1c0 arch/x86/kvm/vmx/vmx.c:6692
 kvm_arch_vcpu_free arch/x86/kvm/x86.c:9052 [inline]
 kvm_free_vcpus arch/x86/kvm/x86.c:9513 [inline]
 kvm_arch_destroy_vm+0x208/0x3b0 arch/x86/kvm/x86.c:9615
 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:816 [inline]
 kvm_put_kvm+0x398/0x650 arch/x86/kvm/../../../virt/kvm/kvm_main.c:837
 kvm_vcpu_release+0x51/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2663
 __fput+0x1e1/0x520 fs/file_table.c:280
 ____fput+0x1f/0x30 fs/file_table.c:313
 task_work_run+0xf6/0x130 kernel/task_work.c:113
 get_signal+0x12c3/0x1320 kernel/signal.c:2528
 do_signal+0x2f/0x6c0 arch/x86/kernel/signal.c:815
 exit_to_usermode_loop+0x250/0x2c0 arch/x86/entry/common.c:159
 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:274 [inline]
 do_syscall_64+0x353/0x370 arch/x86/entry/common.c:300
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88811226d248 of 1 bytes by interrupt on cpu 1:
 __remove_hrtimer+0x52/0x130 kernel/time/hrtimer.c:991
 __run_hrtimer kernel/time/hrtimer.c:1496 [inline]
 __hrtimer_run_queues+0x23c/0x5f0 kernel/time/hrtimer.c:1576
 hrtimer_interrupt+0x22a/0x480 kernel/time/hrtimer.c:1638
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1110 [inline]
 smp_apic_timer_interrupt+0xdc/0x280 arch/x86/kernel/apic/apic.c:1135
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 preempt_count arch/x86/include/asm/preempt.h:26 [inline]
 check_kcov_mode kernel/kcov.c:68 [inline]
 __sanitizer_cov_trace_pc+0x14/0x50 kernel/kcov.c:102
 __read_once_size+0x41/0xe0 include/linux/compiler.h:230
 task_css_is_root include/linux/cgroup.h:531 [inline]
 freezer_fork+0x46/0x140 kernel/cgroup/legacy_freezer.c:214
 cgroup_post_fork+0xb7/0x300 kernel/cgroup/cgroup.c:6067
 copy_process+0x2f69/0x3b50 kernel/fork.c:2227
 _do_fork+0xfe/0x6e0 kernel/fork.c:2366
 kernel_thread+0xa4/0xd0 kernel/fork.c:2453
 create_kthread kernel/kthread.c:278 [inline]
 kthreadd+0x348/0x3f0 kernel/kthread.c:596
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2 Comm: kthreadd Not tainted 5.4.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/12 07:00 https://github.com/google/ktsan.git kcsan ef798c30ba4e d973f528 .config console log report ci2-upstream-kcsan-gce
2019/12/07 23:12 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1508f453 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.