======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.6.2648/16635 is trying to acquire lock:
ffff8880b86241a8 (tasklet_sync_callback.cb_lock){+...}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
ffff8880b86241a8 (tasklet_sync_callback.cb_lock){+...}-{3:3}, at: tasklet_lock_callback kernel/softirq.c:881 [inline]
ffff8880b86241a8 (tasklet_sync_callback.cb_lock){+...}-{3:3}, at: tasklet_action_common+0xc5/0x600 kernel/softirq.c:931
but task is already holding lock:
ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:620 [inline]
ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: input_inject_event+0xab/0x310 drivers/input/input.c:419
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&dev->event_lock#2){+.+.}-{3:3}:
rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
spin_lock include/linux/spinlock_rt.h:45 [inline]
class_spinlock_irqsave_constructor include/linux/spinlock.h:620 [inline]
input_inject_event+0xab/0x310 drivers/input/input.c:419
led_trigger_event+0x13b/0x220 drivers/leds/led-triggers.c:420
kbd_propagate_led_state drivers/tty/vt/keyboard.c:1118 [inline]
kbd_bh+0x1b4/0x2c0 drivers/tty/vt/keyboard.c:1297
tasklet_action_common+0x31c/0x600 kernel/softirq.c:942
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
run_ktimerd+0x69/0x100 kernel/softirq.c:1155
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #0 (tasklet_sync_callback.cb_lock){+...}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3167 [inline]
check_prevs_add kernel/locking/lockdep.c:3286 [inline]
validate_chain kernel/locking/lockdep.c:3910 [inline]
__lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5239
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5870
rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
spin_lock include/linux/spinlock_rt.h:45 [inline]
tasklet_lock_callback kernel/softirq.c:881 [inline]
tasklet_action_common+0xc5/0x600 kernel/softirq.c:931
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
__local_bh_enable_ip+0x170/0x2b0 kernel/softirq.c:302
local_bh_enable include/linux/bottom_half.h:33 [inline]
__alloc_skb+0x1ad/0x7a0 net/core/skbuff.c:699
alloc_skb include/linux/skbuff.h:1384 [inline]
hidp_send_message+0xb5/0x230 net/bluetooth/hidp/core.c:108
hidp_send_intr_message net/bluetooth/hidp/core.c:140 [inline]
hidp_input_event+0x2a4/0x380 net/bluetooth/hidp/core.c:172
input_event_dispose+0x80/0x6b0 drivers/input/input.c:322
input_inject_event+0x1fa/0x310 drivers/input/input.c:424
led_trigger_set+0x39e/0x940 drivers/leds/led-triggers.c:197
led_classdev_unregister+0xa8/0x270 drivers/leds/led-class.c:622
input_leds_disconnect+0x96/0x140 drivers/input/input-leds.c:184
__input_unregister_device+0x356/0x650 drivers/input/input.c:2206
input_unregister_device+0x9b/0x100 drivers/input/input.c:2438
hidp_session_dev_del net/bluetooth/hidp/core.c:886 [inline]
hidp_session_probe+0x775/0x8b0 net/bluetooth/hidp/core.c:1171
l2cap_register_user+0xbd/0x1d0 net/bluetooth/l2cap_core.c:1754
hidp_connection_add+0x1582/0x1a10 net/bluetooth/hidp/core.c:1421
do_hidp_sock_ioctl net/bluetooth/hidp/sock.c:78 [inline]
hidp_sock_ioctl+0x403/0x650 net/bluetooth/hidp/sock.c:125
sock_do_ioctl+0x101/0x320 net/socket.c:1340
sock_ioctl+0x57d/0x7f0 net/socket.c:1461
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&dev->event_lock#2);
lock(tasklet_sync_callback.cb_lock);
lock(&dev->event_lock#2);
lock(tasklet_sync_callback.cb_lock);
*** DEADLOCK ***
8 locks held by syz.6.2648/16635:
#0: ffff88823bf78370 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_register_user+0x34/0x1d0 net/bluetooth/l2cap_core.c:1741
#1: ffffffff8f75a7e0 (hidp_session_sem){++++}-{4:4}, at: hidp_session_probe+0x98/0x8b0 net/bluetooth/hidp/core.c:1139
#2: ffffffff8f01e3f8 (input_mutex){+.+.}-{4:4}, at: class_mutex_constructor include/linux/mutex.h:253 [inline]
#2: ffffffff8f01e3f8 (input_mutex){+.+.}-{4:4}, at: __input_unregister_device+0x2d8/0x650 drivers/input/input.c:2204
#3: ffff88803e28e788 (&led_cdev->trigger_lock){+.+.}-{4:4}, at: led_classdev_unregister+0x75/0x270 drivers/leds/led-class.c:620
#4: ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
#4: ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:620 [inline]
#4: ffff888062bec270 (&dev->event_lock#2){+.+.}-{3:3}, at: input_inject_event+0xab/0x310 drivers/input/input.c:419
#5: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#5: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#5: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: __rt_spin_lock kernel/locking/spinlock_rt.c:50 [inline]
#5: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: rt_spin_lock+0x1e0/0x400 kernel/locking/spinlock_rt.c:57
#6: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#6: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#6: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: class_rcu_constructor include/linux/rcupdate.h:1183 [inline]
#6: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: input_inject_event+0xb7/0x310 drivers/input/input.c:420
#7: ffffffff8e1c3780 (rcu_read_lock){....}-{1:3}, at: __local_bh_disable_ip+0x3c/0x420 kernel/softirq.c:163
stack backtrace:
CPU: 0 UID: 0 PID: 16635 Comm: syz.6.2648 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2045
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2177
check_prev_add kernel/locking/lockdep.c:3167 [inline]
check_prevs_add kernel/locking/lockdep.c:3286 [inline]
validate_chain kernel/locking/lockdep.c:3910 [inline]
__lock_acquire+0x1520/0x2ce0 kernel/locking/lockdep.c:5239
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5870
rt_spin_lock+0x83/0x400 kernel/locking/spinlock_rt.c:56
spin_lock include/linux/spinlock_rt.h:45 [inline]
tasklet_lock_callback kernel/softirq.c:881 [inline]
tasklet_action_common+0xc5/0x600 kernel/softirq.c:931
handle_softirqs+0x1d9/0x6c0 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
__local_bh_enable_ip+0x170/0x2b0 kernel/softirq.c:302
local_bh_enable include/linux/bottom_half.h:33 [inline]
__alloc_skb+0x1ad/0x7a0 net/core/skbuff.c:699
alloc_skb include/linux/skbuff.h:1384 [inline]
hidp_send_message+0xb5/0x230 net/bluetooth/hidp/core.c:108
hidp_send_intr_message net/bluetooth/hidp/core.c:140 [inline]
hidp_input_event+0x2a4/0x380 net/bluetooth/hidp/core.c:172
input_event_dispose+0x80/0x6b0 drivers/input/input.c:322
input_inject_event+0x1fa/0x310 drivers/input/input.c:424
led_trigger_set+0x39e/0x940 drivers/leds/led-triggers.c:197
led_classdev_unregister+0xa8/0x270 drivers/leds/led-class.c:622
input_leds_disconnect+0x96/0x140 drivers/input/input-leds.c:184
__input_unregister_device+0x356/0x650 drivers/input/input.c:2206
input_unregister_device+0x9b/0x100 drivers/input/input.c:2438
hidp_session_dev_del net/bluetooth/hidp/core.c:886 [inline]
hidp_session_probe+0x775/0x8b0 net/bluetooth/hidp/core.c:1171
l2cap_register_user+0xbd/0x1d0 net/bluetooth/l2cap_core.c:1754
hidp_connection_add+0x1582/0x1a10 net/bluetooth/hidp/core.c:1421
do_hidp_sock_ioctl net/bluetooth/hidp/sock.c:78 [inline]
hidp_sock_ioctl+0x403/0x650 net/bluetooth/hidp/sock.c:125
sock_do_ioctl+0x101/0x320 net/socket.c:1340
sock_ioctl+0x57d/0x7f0 net/socket.c:1461
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xff/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f82fad3de59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f82f8f54028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f82fafc6180 RCX: 00007f82fad3de59
RDX: 0000200000000340 RSI: 00000000400448c8 RDI: 0000000000000009
RBP: 00007f82fadd3e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f82fafc6218 R14: 00007f82fafc6180 R15: 00007ffffd05b1a8
</TASK>