program: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) r1 = socket$nl_generic(0x10, 0x3, 0x10) r2 = socket$nl_generic(0x10, 0x3, 0x10) r3 = syz_genetlink_get_family_id$smc(&(0x7f00000033c0), r2) sendmsg$SMC_PNETID_ADD(r2, &(0x7f00000034c0)={0x0, 0x0, &(0x7f0000003480)={&(0x7f0000000000)={0x34, r3, 0x1, 0x70bd28, 0x25dfdbfe, {}, [@SMC_PNETID_NAME={0x9, 0x1, 'syz1\x00'}, @SMC_PNETID_ETHNAME={0x14, 0x2, 'bridge_slave_0\x00'}]}, 0x34}, 0x1, 0x0, 0x0, 0x850c081d989709a5}, 0x40000) sendmsg$SMC_PNETID_ADD(r1, &(0x7f0000000180)={0x0, 0x0, &(0x7f0000000100)={&(0x7f0000000040)={0x34, r3, 0x1, 0x70bd2b, 0x25dfdbfd, {}, [@SMC_PNETID_NAME={0x9, 0x1, 'syz2\x00'}, @SMC_PNETID_ETHNAME={0x14, 0x2, 'ip6erspan0\x00'}]}, 0x34}}, 0x800) close(r0) socket(0x2b, 0x1, 0x1) bind$inet6(r0, &(0x7f0000000040)={0xa, 0x4e22, 0x0, @empty}, 0x1c) listen(r0, 0x0) r4 = socket$inet_smc(0x2b, 0x1, 0x0) connect$inet(r4, &(0x7f0000000000)={0x2, 0x4e22, @local}, 0x10) [ 76.029110][ T5315] Bluetooth: hci0: command tx timeout [ 76.080009][ T5337] smc: net device bridge_slave_0 applied user defined pnetid SYZ1 [ 76.112756][ T5336] [ 76.113788][ T5336] ====================================================== [ 76.116749][ T5336] WARNING: possible circular locking dependency detected [ 76.119575][ T5336] syzkaller #0 Not tainted [ 76.121431][ T5336] ------------------------------------------------------ [ 76.124256][ T5336] syz.0.0/5336 is trying to acquire lock: [ 76.126747][ T5336] ffff888012b616d8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 76.131908][ T5336] [ 76.131908][ T5336] but task is already holding lock: [ 76.135063][ T5336] ffff888012b60260 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 76.138954][ T5336] [ 76.138954][ T5336] which lock already depends on the new lock. [ 76.138954][ T5336] [ 76.143368][ T5336] [ 76.143368][ T5336] the existing dependency chain (in reverse order) is: [ 76.147300][ T5336] [ 76.147300][ T5336] -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: [ 76.150815][ T5336] lock_sock_nested+0x48/0x100 [ 76.153084][ T5336] smc_listen_out+0x109/0x3e0 [ 76.155279][ T5336] smc_listen_work+0x581/0xf50 [ 76.157307][ T5336] process_scheduled_works+0xaec/0x17a0 [ 76.159927][ T5336] worker_thread+0x89f/0xd90 [ 76.162078][ T5336] kthread+0x726/0x8b0 [ 76.164042][ T5336] ret_from_fork+0x51b/0xa40 [ 76.166215][ T5336] ret_from_fork_asm+0x1a/0x30 [ 76.168633][ T5336] [ 76.168633][ T5336] -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: [ 76.172948][ T5336] __lock_acquire+0x15a5/0x2cf0 [ 76.175230][ T5336] lock_acquire+0x106/0x330 [ 76.177184][ T5336] __flush_work+0x700/0xc50 [ 76.179346][ T5336] __cancel_work_sync+0xbe/0x110 [ 76.181761][ T5336] smc_clcsock_release+0x60/0xf0 [ 76.184151][ T5336] __smc_release+0x66b/0x7e0 [ 76.186358][ T5336] smc_close_non_accepted+0xd5/0x1f0 [ 76.188855][ T5336] smc_close_active+0xb67/0xf10 [ 76.191226][ T5336] __smc_release+0x8d/0x7e0 [ 76.193141][ T5336] smc_release+0x2ce/0x560 [ 76.194887][ T5336] sock_close+0xc3/0x240 [ 76.196690][ T5336] __fput+0x44f/0xa70 [ 76.198202][ T5336] task_work_run+0x1d9/0x270 [ 76.199899][ T5336] exit_to_user_mode_loop+0xed/0x480 [ 76.201876][ T5336] do_syscall_64+0x2b7/0xf80 [ 76.203648][ T5336] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 76.205849][ T5336] [ 76.205849][ T5336] other info that might help us debug this: [ 76.205849][ T5336] [ 76.209461][ T5336] Possible unsafe locking scenario: [ 76.209461][ T5336] [ 76.212095][ T5336] CPU0 CPU1 [ 76.214250][ T5336] ---- ---- [ 76.216605][ T5336] lock(sk_lock-AF_SMC/1); [ 76.218591][ T5336] lock((work_completion)(&new_smc->smc_listen_work)); [ 76.222664][ T5336] lock(sk_lock-AF_SMC/1); [ 76.225660][ T5336] lock((work_completion)(&new_smc->smc_listen_work)); [ 76.228562][ T5336] [ 76.228562][ T5336] *** DEADLOCK *** [ 76.228562][ T5336] [ 76.231971][ T5336] 3 locks held by syz.0.0/5336: [ 76.234052][ T5336] #0: ffff8880230df008 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: sock_close+0x9b/0x240 [ 76.238527][ T5336] #1: ffff888012b60260 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 76.242243][ T5336] #2: ffffffff8e35a360 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 76.246119][ T5336] [ 76.246119][ T5336] stack backtrace: [ 76.248733][ T5336] CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 76.248747][ T5336] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 76.248754][ T5336] Call Trace: [ 76.248760][ T5336] [ 76.248771][ T5336] dump_stack_lvl+0xe8/0x150 [ 76.248789][ T5336] print_circular_bug+0x2e1/0x300 [ 76.248805][ T5336] check_noncircular+0x12e/0x150 [ 76.248819][ T5336] __lock_acquire+0x15a5/0x2cf0 [ 76.248831][ T5336] ? do_raw_spin_lock+0x12b/0x2f0 [ 76.248847][ T5336] ? __flush_work+0x100/0xc50 [ 76.248861][ T5336] lock_acquire+0x106/0x330 [ 76.248869][ T5336] ? __flush_work+0x100/0xc50 [ 76.248881][ T5336] ? __flush_work+0x100/0xc50 [ 76.248891][ T5336] __flush_work+0x700/0xc50 [ 76.248900][ T5336] ? __flush_work+0x100/0xc50 [ 76.248909][ T5336] ? __flush_work+0x100/0xc50 [ 76.248929][ T5336] ? __pfx___flush_work+0x10/0x10 [ 76.248940][ T5336] ? __pfx_wq_barrier_func+0x10/0x10 [ 76.248956][ T5336] ? __cancel_work_sync+0x5c/0x110 [ 76.248968][ T5336] __cancel_work_sync+0xbe/0x110 [ 76.248981][ T5336] smc_clcsock_release+0x60/0xf0 [ 76.248997][ T5336] __smc_release+0x66b/0x7e0 [ 76.249008][ T5336] ? __local_bh_enable_ip+0xd0/0x130 [ 76.249021][ T5336] smc_close_non_accepted+0xd5/0x1f0 [ 76.249033][ T5336] smc_close_active+0xb67/0xf10 [ 76.249046][ T5336] ? __pfx_sock_def_readable+0x10/0x10 [ 76.249058][ T5336] __smc_release+0x8d/0x7e0 [ 76.249068][ T5336] ? __local_bh_enable_ip+0xd0/0x130 [ 76.249080][ T5336] smc_release+0x2ce/0x560 [ 76.249091][ T5336] sock_close+0xc3/0x240 [ 76.249101][ T5336] ? __pfx_sock_close+0x10/0x10 [ 76.249110][ T5336] __fput+0x44f/0xa70 [ 76.249124][ T5336] task_work_run+0x1d9/0x270 [ 76.249139][ T5336] ? __pfx_task_work_run+0x10/0x10 [ 76.249154][ T5336] exit_to_user_mode_loop+0xed/0x480 [ 76.249167][ T5336] ? rcu_is_watching+0x15/0xb0 [ 76.249179][ T5336] do_syscall_64+0x2b7/0xf80 [ 76.249193][ T5336] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 76.249204][ T5336] ? clear_bhb_loop+0x60/0xb0 [ 76.249215][ T5336] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 76.249225][ T5336] RIP: 0033:0x7fbfbdb9acb9 [ 76.249237][ T5336] 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 [ 76.249246][ T5336] RSP: 002b:00007ffcf796c658 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 [ 76.249257][ T5336] RAX: 0000000000000000 RBX: 00007ffcf796c740 RCX: 00007fbfbdb9acb9 [ 76.249264][ T5336] RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 [ 76.249270][ T5336] RBP: 0000000000012887 R08: 0000000000000001 R09: 0000000000000000 [ 76.249276][ T5336] R10: 00007fbfbd9ff02c R11: 0000000000000246 R12: 00007ffcf796c780 [ 76.249283][ T5336] R13: 00007fbfbde15fac R14: 00000000000128d2 R15: 00007fbfbde15fa0 [ 76.249294][ T5336]