program: r0 = socket$inet(0x2b, 0x1, 0x0) (async) r1 = socket$inet6_tcp(0xa, 0x1, 0x0) close(r1) (async) socket(0x2b, 0x1, 0x1) (async) bind$inet6(r1, &(0x7f0000000040)={0xa, 0x4e22, 0x0, @empty}, 0x1c) listen(r1, 0x0) connect$inet(r0, &(0x7f0000000000)={0x2, 0x4e22, @loopback}, 0x10) (async) r2 = syz_init_net_socket$x25(0x9, 0x5, 0x0) ioctl$SIOCX25SCAUSEDIAG(r2, 0x89ec, 0x0) [ 75.789134][ T5311] Bluetooth: hci0: command tx timeout [ 75.865279][ T5326] [ 75.866225][ T5326] ====================================================== [ 75.868859][ T5326] WARNING: possible circular locking dependency detected [ 75.871707][ T5326] 6.14.0-syzkaller-11125-g609706855d90 #0 Not tainted [ 75.874478][ T5326] ------------------------------------------------------ [ 75.877215][ T5326] syz.0.0/5326 is trying to acquire lock: [ 75.879518][ T5326] ffff8880443514d0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xee/0xc60 [ 75.884105][ T5326] [ 75.884105][ T5326] but task is already holding lock: [ 75.887040][ T5326] ffff888044350258 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x234/0x540 [ 75.890527][ T5326] [ 75.890527][ T5326] which lock already depends on the new lock. [ 75.890527][ T5326] [ 75.894743][ T5326] [ 75.894743][ T5326] the existing dependency chain (in reverse order) is: [ 75.898241][ T5326] [ 75.898241][ T5326] -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: [ 75.901352][ T5326] lock_acquire+0x116/0x2f0 [ 75.903401][ T5326] lock_sock_nested+0x48/0x100 [ 75.905515][ T5326] smc_listen_out+0x11b/0x3e0 [ 75.907617][ T5326] smc_listen_work+0x5b7/0xf30 [ 75.909688][ T5326] process_scheduled_works+0xac3/0x18e0 [ 75.912175][ T5326] worker_thread+0x870/0xd50 [ 75.914141][ T5326] kthread+0x7b7/0x940 [ 75.915991][ T5326] ret_from_fork+0x4b/0x80 [ 75.917852][ T5326] ret_from_fork_asm+0x1a/0x30 [ 75.919755][ T5326] [ 75.919755][ T5326] -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: [ 75.923726][ T5326] validate_chain+0xa69/0x24e0 [ 75.925838][ T5326] __lock_acquire+0xad5/0xd80 [ 75.927836][ T5326] lock_acquire+0x116/0x2f0 [ 75.929767][ T5326] __flush_work+0x75b/0xc60 [ 75.931770][ T5326] __cancel_work_sync+0xbc/0x110 [ 75.933676][ T5326] smc_clcsock_release+0x62/0xf0 [ 75.935957][ T5326] __smc_release+0x683/0x800 [ 75.937918][ T5326] smc_close_non_accepted+0xd8/0x1f0 [ 75.940348][ T5326] smc_close_active+0xadb/0xe90 [ 75.942191][ T5326] __smc_release+0xa0/0x800 [ 75.944109][ T5326] smc_release+0x2dc/0x540 [ 75.946136][ T5326] sock_close+0xbc/0x240 [ 75.948143][ T5326] __fput+0x3e9/0x9f0 [ 75.950080][ T5326] task_work_run+0x251/0x310 [ 75.952230][ T5326] syscall_exit_to_user_mode+0x13f/0x340 [ 75.954792][ T5326] do_syscall_64+0x100/0x230 [ 75.956696][ T5326] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.959125][ T5326] [ 75.959125][ T5326] other info that might help us debug this: [ 75.959125][ T5326] [ 75.963165][ T5326] Possible unsafe locking scenario: [ 75.963165][ T5326] [ 75.966150][ T5326] CPU0 CPU1 [ 75.968358][ T5326] ---- ---- [ 75.970329][ T5326] lock(sk_lock-AF_SMC/1); [ 75.971946][ T5326] lock((work_completion)(&new_smc->smc_listen_work)); [ 75.975253][ T5326] lock(sk_lock-AF_SMC/1); [ 75.977802][ T5326] lock((work_completion)(&new_smc->smc_listen_work)); [ 75.980288][ T5326] [ 75.980288][ T5326] *** DEADLOCK *** [ 75.980288][ T5326] [ 75.983314][ T5326] 3 locks held by syz.0.0/5326: [ 75.985304][ T5326] #0: ffff8880433d6c08 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 [ 75.989361][ T5326] #1: ffff888044350258 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x234/0x540 [ 75.993070][ T5326] #2: ffffffff8ed3b560 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xee/0xc60 [ 75.996717][ T5326] [ 75.996717][ T5326] stack backtrace: [ 75.999106][ T5326] CPU: 0 UID: 0 PID: 5326 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-11125-g609706855d90 #0 PREEMPT(full) [ 75.999120][ T5326] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 75.999126][ T5326] Call Trace: [ 75.999133][ T5326] [ 75.999138][ T5326] dump_stack_lvl+0x241/0x360 [ 75.999156][ T5326] ? __pfx_dump_stack_lvl+0x10/0x10 [ 75.999169][ T5326] ? __pfx__printk+0x10/0x10 [ 75.999182][ T5326] ? print_lock+0x171/0x1a0 [ 75.999194][ T5326] print_circular_bug+0x2e1/0x300 [ 75.999208][ T5326] check_noncircular+0x142/0x160 [ 75.999222][ T5326] validate_chain+0xa69/0x24e0 [ 75.999235][ T5326] ? _raw_spin_unlock_irqrestore+0xde/0x140 [ 75.999250][ T5326] ? look_up_lock_class+0x7b/0x170 [ 75.999264][ T5326] ? register_lock_class+0x54/0x330 [ 75.999274][ T5326] __lock_acquire+0xad5/0xd80 [ 75.999286][ T5326] lock_acquire+0x116/0x2f0 [ 75.999295][ T5326] ? __flush_work+0xee/0xc60 [ 75.999314][ T5326] ? _raw_spin_unlock_irq+0x23/0x50 [ 75.999327][ T5326] ? __flush_work+0xee/0xc60 [ 75.999338][ T5326] __flush_work+0x75b/0xc60 [ 75.999350][ T5326] ? __flush_work+0xee/0xc60 [ 75.999361][ T5326] ? __flush_work+0xee/0xc60 [ 75.999373][ T5326] ? __pfx___flush_work+0x10/0x10 [ 75.999384][ T5326] ? __pfx_wq_barrier_func+0x10/0x10 [ 75.999396][ T5326] ? __pfx___cancel_work+0x10/0x10 [ 75.999407][ T5326] ? __local_bh_enable_ip+0x168/0x200 [ 75.999417][ T5326] ? __smc_release+0x67b/0x800 [ 75.999432][ T5326] ? __pfx___local_bh_enable_ip+0x10/0x10 [ 75.999441][ T5326] ? __smc_release+0x67b/0x800 [ 75.999453][ T5326] __cancel_work_sync+0xbc/0x110 [ 75.999466][ T5326] smc_clcsock_release+0x62/0xf0 [ 75.999477][ T5326] __smc_release+0x683/0x800 [ 75.999491][ T5326] smc_close_non_accepted+0xd8/0x1f0 [ 75.999505][ T5326] smc_close_active+0xadb/0xe90 [ 75.999516][ T5326] ? __pfx_sock_def_readable+0x10/0x10 [ 75.999528][ T5326] __smc_release+0xa0/0x800 [ 75.999542][ T5326] smc_release+0x2dc/0x540 [ 75.999555][ T5326] sock_close+0xbc/0x240 [ 75.999565][ T5326] ? __pfx_sock_close+0x10/0x10 [ 75.999574][ T5326] __fput+0x3e9/0x9f0 [ 75.999589][ T5326] task_work_run+0x251/0x310 [ 75.999603][ T5326] ? _raw_spin_unlock+0x28/0x50 [ 75.999616][ T5326] ? __pfx_task_work_run+0x10/0x10 [ 75.999631][ T5326] ? syscall_exit_to_user_mode+0xa3/0x340 [ 75.999646][ T5326] syscall_exit_to_user_mode+0x13f/0x340 [ 75.999662][ T5326] do_syscall_64+0x100/0x230 [ 75.999671][ T5326] ? clear_bhb_loop+0x45/0xa0 [ 75.999683][ T5326] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 75.999693][ T5326] RIP: 0033:0x7f270618d169 [ 75.999703][ T5326] Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 [ 75.999711][ T5326] RSP: 002b:00007ffc0eb6c8c8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 [ 75.999722][ T5326] RAX: 0000000000000000 RBX: 00007f27063a7ba0 RCX: 00007f270618d169 [ 75.999729][ T5326] RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 [ 75.999735][ T5326] RBP: 00007f27063a7ba0 R08: 0000000000000000 R09: 000000090eb6cbbf [ 75.999741][ T5326] R10: 0000000000dffd7c R11: 0000000000000246 R12: 0000000000012aec [ 75.999748][ T5326] R13: 00007f27063a6080 R14: ffffffffffffffff R15: 00007ffc0eb6c9e0 [ 75.999758][ T5326]