possible deadlock in throtl_pending_timer_fn

Status: upstream: reported on 2026/10/11 03:54
Reported-by: syzbot+13c404041d902b1b2b27@syzkaller.appspotmail.com
First crash: 4d22h, last: 4d22h
▶ ▼ Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in throtl_pending_timer_fn cgroups block 4 syz, C done 12 1473d 1661d 0/29 auto-obsoleted due to no activity on 2023/04/20 01:03
linux-6.1 possible deadlock in throtl_pending_timer_fn (2) 4 1 649d 649d 0/3 auto-obsoleted due to no activity on 2025/04/14 14:43
linux-6.1 possible deadlock in throtl_pending_timer_fn 4 syz, C done 266 1314d 1315d 3/3 fixed on 2023/04/11 15:30
linux-6.1 possible deadlock in throtl_pending_timer_fn (3) 4 18 7d00h 28d 0/3 upstream: reported on 2026/09/17 06:14

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
ksoftirqd/0/14 is trying to acquire lock:
ffff888023da47c8 (&q->queue_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline]
ffff888023da47c8 (&q->queue_lock){..-.}-{2:2}, at: throtl_pending_timer_fn+0xc0/0xea0 block/blk-throttle.c:1286

but task is already holding lock:
ffffc90000d37a60 ((&sq->pending_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline]
ffffc90000d37a60 ((&sq->pending_timer)){+.-.}-{0:0}, at: call_timer_fn+0xca/0x540 kernel/time/timer.c:1638

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 ((&sq->pending_timer)){+.-.}-{0:0}:
       __timer_delete_sync+0xe5/0x290 kernel/time/timer.c:1503
       del_timer_sync include/linux/timer.h:200 [inline]
       throtl_pd_free+0x15/0x40 block/blk-throttle.c:640
       blkg_free+0x6f/0x280 block/blk-cgroup.c:82
       blkg_conf_prep+0x61d/0x830 block/blk-cgroup.c:722
       tg_set_conf+0xdb/0x3c0 block/blk-throttle.c:1474
       cgroup_file_write+0x2c4/0x670 kernel/cgroup/cgroup.c:3967
       kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
       call_write_iter include/linux/fs.h:2179 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0x748/0xd70 fs/read_write.c:594
       ksys_write+0x153/0x260 fs/read_write.c:647
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (&q->queue_lock){..-.}-{2:2}:
       check_prev_add kernel/locking/lockdep.c:3120 [inline]
       check_prevs_add kernel/locking/lockdep.c:3239 [inline]
       validate_chain kernel/locking/lockdep.c:3855 [inline]
       __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120
       lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737
       __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline]
       _raw_spin_lock_irq+0xab/0xf0 kernel/locking/spinlock.c:170
       spin_lock_irq include/linux/spinlock.h:389 [inline]
       throtl_pending_timer_fn+0xc0/0xea0 block/blk-throttle.c:1286
       call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
       expire_timers kernel/time/timer.c:1699 [inline]
       __run_timers+0x56c/0x810 kernel/time/timer.c:1970
       run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
       handle_softirqs+0x336/0x830 kernel/softirq.c:576
       run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
       smpboot_thread_fn+0x520/0x990 kernel/smpboot.c:164
       kthread+0x42e/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((&sq->pending_timer));
                               lock(
&q->queue_lock);
                               lock((&sq->pending_timer));
  lock(&q->queue_lock);

 *** DEADLOCK ***

1 lock held by ksoftirqd/0/14:
 #0: ffffc90000d37a60 ((&sq->pending_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline]
 #0: ffffc90000d37a60 ((&sq->pending_timer)){+.-.}-{0:0}, at: call_timer_fn+0xca/0x540 kernel/time/timer.c:1638

stack backtrace:
CPU: 0 PID: 14 Comm: ksoftirqd/0 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178
 check_prev_add kernel/locking/lockdep.c:3120 [inline]
 check_prevs_add kernel/locking/lockdep.c:3239 [inline]
 validate_chain kernel/locking/lockdep.c:3855 [inline]
 __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120
 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline]
 _raw_spin_lock_irq+0xab/0xf0 kernel/locking/spinlock.c:170
 spin_lock_irq include/linux/spinlock.h:389 [inline]
 throtl_pending_timer_fn+0xc0/0xea0 block/blk-throttle.c:1286
 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
 expire_timers kernel/time/timer.c:1699 [inline]
 __run_timers+0x56c/0x810 kernel/time/timer.c:1970
 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
 handle_softirqs+0x336/0x830 kernel/softirq.c:576
 run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
 smpboot_thread_fn+0x520/0x990 kernel/smpboot.c:164
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/11 03:54 linux-5.15.y a051a4bf909f 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in throtl_pending_timer_fn
* Struck through repros no longer work on HEAD.