INFO: task khidpd_10cf05df:8217 blocked for more than 143 seconds.
      Not tainted 6.16.0-rc3-syzkaller-00159-g223e2288f4b8-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:khidpd_10cf05df state:D
 stack:27216 pid:8217  tgid:8217  ppid:2      task_flags:0x208040 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x16f5/0x4d00
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x724/0xe80
 l2cap_unregister_user+0x6a/0x1b0
 hidp_session_thread+0x3c9/0x410
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
INFO: task syz.2.712:8230 blocked for more than 143 seconds.
      Not tainted 6.16.0-rc3-syzkaller-00159-g223e2288f4b8-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.712       state:D stack:26136 pid:8230  tgid:8229  ppid:5822   task_flags:0x400140 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x16f5/0x4d00
 schedule+0x165/0x360
 schedule_timeout+0x9a/0x270
 wait_for_completion+0x2bf/0x5d0
 __flush_work+0x9b9/0xbc0
 __cancel_work_sync+0xbe/0x110
 hidp_session_remove+0x62/0x260
 l2cap_unregister_user+0x18e/0x1b0
 hidp_connection_del+0xb0/0x170
 hidp_sock_ioctl+0x317/0x560
 sock_do_ioctl+0xdc/0x300
 sock_ioctl+0x576/0x790
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f68b178e929
RSP: 002b:00007f68b26bc038 EFLAGS: 00000246
 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f68b19b5fa0 RCX: 00007f68b178e929
RDX: 0000200000000000 RSI: 00000000400448c9 RDI: 0000000000000004
RBP: 00007f68b1810b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f68b19b5fa0 R15: 00007fff36801598
 </TASK>
INFO: task syz.0.715:8239 blocked for more than 143 seconds.
      Not tainted 6.16.0-rc3-syzkaller-00159-g223e2288f4b8-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.715       state:D stack:28328 pid:8239  tgid:8238  ppid:5818   task_flags:0x400140 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x16f5/0x4d00
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x724/0xe80
 l2cap_chan_connect+0x102/0xe30
 l2cap_sock_connect+0x5c5/0x7a0
 __sys_connect+0x316/0x440
 __x64_sys_connect+0x7a/0x90
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd67ed8e929
RSP: 002b:00007fd67fb2a038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00007fd67efb5fa0 RCX: 00007fd67ed8e929
RDX: 000000000000000e RSI: 0000200000000080 RDI: 0000000000000004
RBP: 00007fd67ee10b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fd67efb5fa0 R15: 00007ffdaaeca3b8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/34:
 #0: ffffffff8e13ee60 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
3 locks held by kworker/1:1/47:
 #0: ffff88801a480d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000075fbc0 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff8881121f0240 (&data->fib_lock){+.+.}-{4:4}, at: nsim_fib_event_work+0x26b/0x3180
3 locks held by kworker/1:3/2271:
 #0: ffff88801a480d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000b237bc0 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88811f9e6240 (&data->fib_lock){+.+.}-{4:4}, at: nsim_fib_event_work+0x26b/0x3180
9 locks held by kworker/0:2/4711:
4 locks held by kworker/u11:1/5201:
 #0: ffff888029682148 ((wq_completion)hci2){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9002149fbc0 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888111720dc0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_cmd_sync_work+0x1d4/0x3a0
 #3: ffff8881117200b8 (&hdev->lock){+.+.}-{4:4}, at: hci_abort_conn_sync+0x1eb/0xdf0
2 locks held by getty/5634:
 #0: ffff88810e5310a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: 
ffffc900025c62f0
 (
&ldata->atomic_read_lock
){+.+.}-{4:4}
, at: n_tty_read+0x43e/0x1400
1 lock held by khidpd_10cf05df/8217:
 #0: 
ffff8881117200b8
 (&hdev->lock
){+.+.}-{4:4}, at: l2cap_unregister_user+0x6a/0x1b0
2 locks held by syz.2.712/8230:
 #0: 
ffff8881117200b8 (&hdev->lock){+.+.}-{4:4}, at: l2cap_unregister_user+0x6a/0x1b0
 #1: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_remove+0x2c/0x260
1 lock held by syz.0.715/8239:
 #0: ffff8881117200b8
 (&hdev->lock){+.+.}-{4:4}, at: l2cap_chan_connect+0x102/0xe30
5 locks held by kworker/u8:4/8264:
 #0: ffff88801b2f6948 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90009f87bc0 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffffffff8f5033d0 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf7/0x800
 #3: ffff88811d83c0e8 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x10a/0x3d0
 #4: ffff88811f9e4250 (&devlink->lock_key#30){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x11c/0x3d0
1 lock held by syz.3.721/8391:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.4.727/8460:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.4.727/8461:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.6.729/8642:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.5.752/8672:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.5.752/8676:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.7.761/8893:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.7.761/8896:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.8.765/8932:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.8.765/8933:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.9.766/9067:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.9.766/9068:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.2.770/9140:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.2.770/9141:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.2.770/9145:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.0.775/9200:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.0.775/9202:
 #0: ffffffff8f6a1250 (hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.3.776/9226:
 #0: 
ffffffff8f6a1250
 (
hidp_session_sem){++++}-{4:4}, at: hidp_session_find+0x1a/0x100
1 lock held by syz.4.777/9260:
 #0: ffffffff8f6a1250
 (
hidp_session_sem){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.4.777/9261:
 #0: 
ffffffff8f6a1250
 (
hidp_session_sem){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.6.782/9298:
 #0: 
ffffffff8f6a1250
 (
hidp_session_sem){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.6.782/9299:
 #0: 
ffffffff8f6a1250
 (
hidp_session_sem
){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.5.784/9467:
 #0: 
ffffffff8f6a1250 (
hidp_session_sem
){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.5.784/9471:
 #0: 
ffffffff8f6a1250
 (
hidp_session_sem
){++++}-{4:4}
, at: hidp_session_find+0x1a/0x100
1 lock held by syz.7.785/9512:
 #0: 
ffffffff8e144978
 (
rcu_state.exp_mutex
){+.+.}-{4:4}
, at: synchronize_rcu_expedited+0x3b9/0x730
1 lock held by syz.7.785/9513:
 #0: 
ffffffff8e144978
 (
rcu_state.exp_mutex
){+.+.}-{4:4}
, at: synchronize_rcu_expedited+0x2f6/0x730

=============================================

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.16.0-rc3-syzkaller-00159-g223e2288f4b8-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xfee/0x1030
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 4711 Comm: kworker/0:2 Not tainted 6.16.0-rc3-syzkaller-00159-g223e2288f4b8-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: events hidp_session_dev_work
RIP: 0010:io_serial_out+0x7c/0xc0
Code: 08 79 fc 44 89 f9 d3 e5 49 83 c6 40 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 ac 8b dc fc 41 03 2e 89 d8 89 ea ee <5b> 41 5c 41 5e 41 5f 5d e9 07 4c 22 06 cc 44 89 f9 80 e1 07 38 c1
RSP: 0018:ffffc90007346c50 EFLAGS: 00000002
RAX: 000000000000005b RBX: 000000000000005b RCX: 0000000000000000
RDX: 00000000000003f8 RSI: 0000000000000000 RDI: 0000000000000020
RBP: 00000000000003f8 R08: ffff888020a68237 R09: 1ffff1100414d046
R10: dffffc0000000000 R11: ffffffff85474610 R12: dffffc0000000000
R13: ffffffff99ac48c1 R14: ffffffff99dc9760 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b8650000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffb983f6d00 CR3: 000000010ea20000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 serial8250_console_write+0x1410/0x1ba0
 console_flush_all+0x728/0xc40
 console_unlock+0xc4/0x270
 vprintk_emit+0x5b7/0x7a0
 dev_vprintk_emit+0x337/0x3f0
 dev_printk_emit+0xe0/0x130
 _dev_warn+0x10a/0x160
 hid_parser_main+0x8b8/0xc40
 hid_open_report+0x85b/0xee0
 hid_generic_probe+0x3d/0x90
 hid_device_probe+0x3a0/0x710
 really_probe+0x26d/0x9a0
 __driver_probe_device+0x18c/0x2f0
 driver_probe_device+0x4f/0x430
 __device_attach_driver+0x2ce/0x530
 bus_for_each_drv+0x251/0x2e0
 __device_attach+0x2b8/0x400
 bus_probe_device+0x185/0x260
 device_add+0x7b6/0xb50
 hid_add_device+0x398/0x540
 hidp_session_dev_work+0x45/0x160
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
