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) [ 84.322872][ T46] Bluetooth: hci0: command tx timeout [ 84.473098][ T5324] smc: net device bridge_slave_0 applied user defined pnetid SYZ1 [ 84.525318][ T5323] [ 84.526490][ T5323] ====================================================== [ 84.529584][ T5323] WARNING: possible circular locking dependency detected [ 84.532564][ T5323] syzkaller #0 Not tainted [ 84.534568][ T5323] ------------------------------------------------------ [ 84.537715][ T5323] syz.0.0/5323 is trying to acquire lock: [ 84.540282][ T5323] ffff888041b996d8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 84.545279][ T5323] [ 84.545279][ T5323] but task is already holding lock: [ 84.548081][ T5323] ffff888041b98260 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 84.551750][ T5323] [ 84.551750][ T5323] which lock already depends on the new lock. [ 84.551750][ T5323] [ 84.555738][ T5323] [ 84.555738][ T5323] the existing dependency chain (in reverse order) is: [ 84.559492][ T5323] [ 84.559492][ T5323] -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: [ 84.562755][ T5323] lock_sock_nested+0x48/0x100 [ 84.565115][ T5323] smc_listen_out+0x109/0x3e0 [ 84.567361][ T5323] smc_listen_work+0x813/0x13f0 [ 84.569746][ T5323] process_scheduled_works+0xaec/0x17a0 [ 84.572620][ T5323] worker_thread+0xda6/0x1360 [ 84.574951][ T5323] kthread+0x726/0x8b0 [ 84.576969][ T5323] ret_from_fork+0x51b/0xa40 [ 84.579214][ T5323] ret_from_fork_asm+0x1a/0x30 [ 84.581544][ T5323] [ 84.581544][ T5323] -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: [ 84.585809][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 84.588119][ T5323] lock_acquire+0x106/0x330 [ 84.590265][ T5323] __flush_work+0x700/0xc50 [ 84.592436][ T5323] __cancel_work_sync+0xbe/0x110 [ 84.594761][ T5323] smc_clcsock_release+0x60/0xf0 [ 84.597060][ T5323] __smc_release+0x66b/0x7e0 [ 84.599297][ T5323] smc_close_non_accepted+0xd5/0x1f0 [ 84.601824][ T5323] smc_close_active+0xb67/0xf10 [ 84.604178][ T5323] __smc_release+0x8d/0x7e0 [ 84.606317][ T5323] smc_release+0x2ce/0x560 [ 84.608646][ T5323] sock_close+0xc3/0x240 [ 84.610617][ T5323] __fput+0x44f/0xa70 [ 84.612737][ T5323] task_work_run+0x1d9/0x270 [ 84.614834][ T5323] exit_to_user_mode_loop+0xed/0x480 [ 84.617122][ T5323] do_syscall_64+0x2b7/0xf80 [ 84.619122][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 84.621683][ T5323] [ 84.621683][ T5323] other info that might help us debug this: [ 84.621683][ T5323] [ 84.625766][ T5323] Possible unsafe locking scenario: [ 84.625766][ T5323] [ 84.628911][ T5323] CPU0 CPU1 [ 84.631169][ T5323] ---- ---- [ 84.633529][ T5323] lock(sk_lock-AF_SMC/1); [ 84.635535][ T5323] lock((work_completion)(&new_smc->smc_listen_work)); [ 84.639515][ T5323] lock(sk_lock-AF_SMC/1); [ 84.642756][ T5323] lock((work_completion)(&new_smc->smc_listen_work)); [ 84.645618][ T5323] [ 84.645618][ T5323] *** DEADLOCK *** [ 84.645618][ T5323] [ 84.649005][ T5323] 3 locks held by syz.0.0/5323: [ 84.651123][ T5323] #0: ffff888011af5ec8 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: sock_close+0x9b/0x240 [ 84.655542][ T5323] #1: ffff888041b98260 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 84.659391][ T5323] #2: ffffffff8e55a360 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 84.663217][ T5323] [ 84.663217][ T5323] stack backtrace: [ 84.665551][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 84.665566][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 84.665573][ T5323] Call Trace: [ 84.665581][ T5323] [ 84.665616][ T5323] dump_stack_lvl+0xe8/0x150 [ 84.665634][ T5323] print_circular_bug+0x2e1/0x300 [ 84.665648][ T5323] check_noncircular+0x12e/0x150 [ 84.665659][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 84.665675][ T5323] ? do_raw_spin_lock+0x12b/0x2f0 [ 84.665690][ T5323] ? __flush_work+0x100/0xc50 [ 84.665700][ T5323] lock_acquire+0x106/0x330 [ 84.665714][ T5323] ? __flush_work+0x100/0xc50 [ 84.665726][ T5323] ? __flush_work+0x100/0xc50 [ 84.665734][ T5323] __flush_work+0x700/0xc50 [ 84.665740][ T5323] ? __flush_work+0x100/0xc50 [ 84.665747][ T5323] ? __flush_work+0x100/0xc50 [ 84.665754][ T5323] ? __pfx___flush_work+0x10/0x10 [ 84.665761][ T5323] ? __pfx_wq_barrier_func+0x10/0x10 [ 84.665777][ T5323] ? __cancel_work_sync+0x5c/0x110 [ 84.665787][ T5323] __cancel_work_sync+0xbe/0x110 [ 84.665798][ T5323] smc_clcsock_release+0x60/0xf0 [ 84.665812][ T5323] __smc_release+0x66b/0x7e0 [ 84.665826][ T5323] ? __local_bh_enable_ip+0xd0/0x130 [ 84.665838][ T5323] smc_close_non_accepted+0xd5/0x1f0 [ 84.665854][ T5323] smc_close_active+0xb67/0xf10 [ 84.665873][ T5323] ? __pfx_sock_def_readable+0x10/0x10 [ 84.665889][ T5323] __smc_release+0x8d/0x7e0 [ 84.665903][ T5323] ? __local_bh_enable_ip+0xd0/0x130 [ 84.665913][ T5323] smc_release+0x2ce/0x560 [ 84.665928][ T5323] sock_close+0xc3/0x240 [ 84.665943][ T5323] ? __pfx_sock_close+0x10/0x10 [ 84.665956][ T5323] __fput+0x44f/0xa70 [ 84.665970][ T5323] task_work_run+0x1d9/0x270 [ 84.665984][ T5323] ? __pfx_task_work_run+0x10/0x10 [ 84.665998][ T5323] exit_to_user_mode_loop+0xed/0x480 [ 84.666013][ T5323] ? rcu_is_watching+0x15/0xb0 [ 84.666026][ T5323] do_syscall_64+0x2b7/0xf80 [ 84.666037][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 84.666047][ T5323] ? trace_irq_disable+0x37/0x100 [ 84.666077][ T5323] ? clear_bhb_loop+0x60/0xb0 [ 84.666088][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 84.666099][ T5323] RIP: 0033:0x7ff8b9b9aeb9 [ 84.666109][ T5323] 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 [ 84.666140][ T5323] RSP: 002b:00007fff30a56b38 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 [ 84.666153][ T5323] RAX: 0000000000000000 RBX: 00007fff30a56c20 RCX: 00007ff8b9b9aeb9 [ 84.666160][ T5323] RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 [ 84.666167][ T5323] RBP: 000000000001491b R08: 0000000000000001 R09: 0000000000000000 [ 84.666173][ T5323] R10: 00007ff8b99ff02c R11: 0000000000000246 R12: 00007fff30a56c60 [ 84.666181][ T5323] R13: 00007ff8b9e15fac R14: 00000000000149ac R15: 00007ff8b9e15fa0 [ 84.666192][ T5323]