syzbot


KCSAN: data-race in advance_sched / hrtimer_start_range_ns

Status: auto-obsoleted due to no activity on 2024/03/16 11:24
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+a268240594b9048ced2b@syzkaller.appspotmail.com
First crash: 68d, last: 68d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in advance_sched / hrtimer_start_range_ns

write to 0xffff88816e732de8 of 8 bytes by task 11669 on cpu 1:
 hrtimer_set_expires_range_ns include/linux/hrtimer.h:214 [inline]
 __hrtimer_start_range_ns kernel/time/hrtimer.c:1251 [inline]
 hrtimer_start_range_ns+0x1a2/0x660 kernel/time/hrtimer.c:1301
 hrtimer_start include/linux/hrtimer.h:378 [inline]
 taprio_start_sched+0x81/0x90 net/sched/sch_taprio.c:1295
 taprio_change+0x2670/0x28a0 net/sched/sch_taprio.c:1987
 qdisc_change net/sched/sch_api.c:1416 [inline]
 tc_modify_qdisc+0xee9/0x1040 net/sched/sch_api.c:1746
 rtnetlink_rcv_msg+0x80a/0x8c0 net/core/rtnetlink.c:6615
 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2543
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6633
 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
 netlink_unicast+0x589/0x660 net/netlink/af_netlink.c:1367
 netlink_sendmsg+0x66e/0x770 net/netlink/af_netlink.c:1908
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x1e9/0x270 net/socket.c:2667
 __do_sys_sendmsg net/socket.c:2676 [inline]
 __se_sys_sendmsg net/socket.c:2674 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2674
 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

write to 0xffff88816e732de8 of 8 bytes by interrupt on cpu 0:
 hrtimer_set_expires include/linux/hrtimer.h:203 [inline]
 advance_sched+0x62b/0x6a0 net/sched/sch_taprio.c:994
 __run_hrtimer kernel/time/hrtimer.c:1688 [inline]
 __hrtimer_run_queues+0x217/0x710 kernel/time/hrtimer.c:1752
 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1814
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
 __sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
 sysvec_apic_timer_interrupt+0x6a/0x80 arch/x86/kernel/apic/apic.c:1076
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
 is_atomic kernel/kcsan/core.c:249 [inline]
 should_watch kernel/kcsan/core.c:277 [inline]
 check_access kernel/kcsan/core.c:752 [inline]
 __tsan_read8+0xe4/0x180 kernel/kcsan/core.c:1025
 batadv_nc_purge_paths+0x6d/0x260 net/batman-adv/network-coding.c:439
 batadv_nc_worker+0x402/0xac0 net/batman-adv/network-coding.c:722
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0x00000280562d0000 -> 0x00000280562e0000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11964 Comm: kworker/u4:2 Not tainted 6.8.0-rc3-syzkaller-00279-g4a7bbe7519b6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: bat_events batadv_nc_worker
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/10 11:23 upstream 4a7bbe7519b6 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in advance_sched / hrtimer_start_range_ns
* Struck through repros no longer work on HEAD.