syzbot


WARNING: bad unlock balance in timekeeping_get_ns

Status: closed as invalid on 2024/09/13 10:29
Subsystems: kernel
[Documentation on labels]
First crash: 160d, last: 160d

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
6.11.0-rc4-next-20240820-syzkaller #0 Not tainted
-------------------------------------
syz.2.464/7756 is trying to release lock (tk_core.seq.seqcount) at:
[<ffffffff8181411c>] timekeeping_debug_get_ns kernel/time/timekeeping.c:256 [inline]
[<ffffffff8181411c>] timekeeping_get_ns+0x5c/0x420 kernel/time/timekeeping.c:401
but there are no more locks to release!

other info that might help us debug this:
3 locks held by syz.2.464/7756:
 #0: ffff88802195c018 (&dum_hcd->dum->lock){-.-.}-{2:2}, at: dummy_timer+0x15d/0x45a0 drivers/usb/gadget/udc/dummy_hcd.c:1814
 #1: ffff8880b912c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: lock_hrtimer_base kernel/time/hrtimer.c:175 [inline]
 #1: ffff8880b912c898 (hrtimer_bases.lock){-.-.}-{2:2}, at: hrtimer_start_range_ns+0x109/0xca0 kernel/time/hrtimer.c:1300
 #2: ffffc90000a48420 (&futex_queues[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #2: ffffc90000a48420 (&futex_queues[i].lock){+.+.}-{2:2}, at: futex_unqueue+0x4e/0xf0 kernel/futex/core.c:601

stack backtrace:
CPU: 1 UID: 0 PID: 7756 Comm: syz.2.464 Not tainted 6.11.0-rc4-next-20240820-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_unlock_imbalance_bug+0x256/0x2c0 kernel/locking/lockdep.c:5202
 __lock_release kernel/locking/lockdep.c:5439 [inline]
 lock_release+0x5cb/0xa30 kernel/locking/lockdep.c:5783
 seqcount_lockdep_reader_access+0x10f/0x220 include/linux/seqlock.h:71
 timekeeping_debug_get_ns kernel/time/timekeeping.c:256 [inline]
 timekeeping_get_ns+0x5c/0x420 kernel/time/timekeeping.c:401
 ktime_get+0x89/0xb0 kernel/time/timekeeping.c:850
 clockevents_program_event+0xe6/0x350 kernel/time/clockevents.c:326
 __hrtimer_reprogram kernel/time/hrtimer.c:679 [inline]
 hrtimer_force_reprogram kernel/time/hrtimer.c:697 [inline]
 __hrtimer_start_range_ns kernel/time/hrtimer.c:1269 [inline]
 hrtimer_start_range_ns+0x7a3/0xca0 kernel/time/hrtimer.c:1302
 hrtimer_start include/linux/hrtimer.h:275 [inline]
 dummy_timer+0x4421/0x45a0 drivers/usb/gadget/udc/dummy_hcd.c:1998
 __run_hrtimer kernel/time/hrtimer.c:1691 [inline]
 __hrtimer_run_queues+0x59b/0xd50 kernel/time/hrtimer.c:1755
 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1817
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1026 [inline]
 __sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1043
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1037 [inline]
 sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1037
 </IRQ>
 <TASK>
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/20 07:51 linux-next bb1b0acdcd66 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: bad unlock balance in timekeeping_get_ns
* Struck through repros no longer work on HEAD.