program: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) r1 = socket(0x10, 0x3, 0x0) socketpair$unix(0x1, 0x1, 0x0, &(0x7f0000000080)={0xffffffffffffffff, 0xffffffffffffffff}) ioctl$sock_SIOCGIFINDEX(r2, 0x8933, &(0x7f0000000000)={'lo\x00', 0x0}) sendmsg$nl_route_sched(r1, &(0x7f0000000000)={0x0, 0x0, 0x0}, 0x0) sendmsg$nl_route_sched(r1, &(0x7f0000000340)={0x0, 0x0, &(0x7f00000000c0)={&(0x7f0000005140)=@newtfilter={0x54, 0x2c, 0xd27, 0x11, 0x0, {0x0, 0x0, 0x0, r3, {}, {}, {0x8, 0xa}}, [@filter_kind_options=@f_u32={{0x8}, {0x28, 0x2, [@TCA_U32_SEL={0x14, 0x5, {0x9, 0x4, 0x0, 0x6fb, 0x8, 0xfcf, 0x7, 0x1}}, @TCA_U32_MARK={0x10, 0xa, {0x4, 0x9}}]}}]}, 0x54}, 0x1, 0x0, 0x0, 0x4000001}, 0xc004) close(r0) r4 = socket(0x2b, 0x1, 0x1) bind$inet6(r0, &(0x7f0000000080)={0xa, 0x4e22, 0x0, @empty}, 0x1c) listen(r4, 0x5) r5 = socket$inet_smc(0x2b, 0x1, 0x0) connect$inet(r5, &(0x7f0000000000)={0x2, 0x4e22, @local}, 0x10) [ 73.268235][ T4660] Bluetooth: hci0: command tx timeout [ 73.426572][ T5327] [ 73.427877][ T5327] ====================================================== [ 73.430895][ T5327] WARNING: possible circular locking dependency detected [ 73.433819][ T5327] syzkaller #0 Not tainted [ 73.435755][ T5327] ------------------------------------------------------ [ 73.438694][ T5327] syz.0.0/5327 is trying to acquire lock: [ 73.441211][ T5327] ffff88801f778a68 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 73.446161][ T5327] [ 73.446161][ T5327] but task is already holding lock: [ 73.449379][ T5327] ffff88801f778ee0 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 73.453257][ T5327] [ 73.453257][ T5327] which lock already depends on the new lock. [ 73.453257][ T5327] [ 73.457737][ T5327] [ 73.457737][ T5327] the existing dependency chain (in reverse order) is: [ 73.461658][ T5327] [ 73.461658][ T5327] -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: [ 73.464905][ T5327] lock_sock_nested+0x41/0x100 [ 73.467101][ T5327] smc_listen_out+0x109/0x3e0 [ 73.469234][ T5327] smc_listen_work+0x813/0x13f0 [ 73.471429][ T5327] process_scheduled_works+0xb5d/0x1860 [ 73.474050][ T5327] worker_thread+0xa53/0xfc0 [ 73.476241][ T5327] kthread+0x389/0x470 [ 73.478248][ T5327] ret_from_fork+0x514/0xb70 [ 73.480467][ T5327] ret_from_fork_asm+0x1a/0x30 [ 73.482664][ T5327] [ 73.482664][ T5327] -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: [ 73.486929][ T5327] __lock_acquire+0x15a5/0x2cf0 [ 73.489225][ T5327] lock_acquire+0x106/0x350 [ 73.491344][ T5327] __flush_work+0x700/0xc50 [ 73.493475][ T5327] __cancel_work_sync+0xbe/0x110 [ 73.495754][ T5327] smc_clcsock_release+0x60/0xf0 [ 73.498146][ T5327] __smc_release+0x66b/0x7e0 [ 73.500335][ T5327] smc_close_non_accepted+0xd5/0x1f0 [ 73.502804][ T5327] smc_close_active+0xb67/0xf10 [ 73.505116][ T5327] __smc_release+0x8d/0x7e0 [ 73.507313][ T5327] smc_release+0x2ce/0x560 [ 73.509438][ T5327] sock_close+0xc3/0x240 [ 73.511438][ T5327] __fput+0x44f/0xa60 [ 73.513395][ T5327] task_work_run+0x1d9/0x270 [ 73.515588][ T5327] exit_to_user_mode_loop+0x193/0x680 [ 73.518139][ T5327] do_syscall_64+0x353/0x580 [ 73.520407][ T5327] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 73.523166][ T5327] [ 73.523166][ T5327] other info that might help us debug this: [ 73.523166][ T5327] [ 73.527620][ T5327] Possible unsafe locking scenario: [ 73.527620][ T5327] [ 73.530645][ T5327] CPU0 CPU1 [ 73.532961][ T5327] ---- ---- [ 73.535193][ T5327] lock(sk_lock-AF_SMC/1); [ 73.537199][ T5327] lock((work_completion)(&new_smc->smc_listen_work)); [ 73.541196][ T5327] lock(sk_lock-AF_SMC/1); [ 73.544002][ T5327] lock((work_completion)(&new_smc->smc_listen_work)); [ 73.546955][ T5327] [ 73.546955][ T5327] *** DEADLOCK *** [ 73.546955][ T5327] [ 73.550418][ T5327] 3 locks held by syz.0.0/5327: [ 73.552553][ T5327] #0: ffff888046dd9f00 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: sock_close+0x9b/0x240 [ 73.556752][ T5327] #1: ffff88801f778ee0 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x255/0x560 [ 73.560546][ T5327] #2: ffffffff8e95cc20 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 73.564325][ T5327] [ 73.564325][ T5327] stack backtrace: [ 73.566774][ T5327] CPU: 0 UID: 0 PID: 5327 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 73.566786][ T5327] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 73.566792][ T5327] Call Trace: [ 73.566799][ T5327] [ 73.566804][ T5327] dump_stack_lvl+0xe8/0x150 [ 73.566819][ T5327] print_circular_bug+0x2e1/0x300 [ 73.566833][ T5327] check_noncircular+0x12e/0x150 [ 73.566846][ T5327] __lock_acquire+0x15a5/0x2cf0 [ 73.566858][ T5327] ? do_raw_spin_lock+0x12b/0x2f0 [ 73.566875][ T5327] ? __flush_work+0x100/0xc50 [ 73.566886][ T5327] lock_acquire+0x106/0x350 [ 73.566895][ T5327] ? __flush_work+0x100/0xc50 [ 73.566907][ T5327] ? __flush_work+0x100/0xc50 [ 73.566917][ T5327] __flush_work+0x700/0xc50 [ 73.566926][ T5327] ? __flush_work+0x100/0xc50 [ 73.566935][ T5327] ? __flush_work+0x100/0xc50 [ 73.566945][ T5327] ? __pfx___flush_work+0x10/0x10 [ 73.566955][ T5327] ? __pfx_wq_barrier_func+0x10/0x10 [ 73.566968][ T5327] ? __cancel_work_sync+0x5c/0x110 [ 73.566981][ T5327] __cancel_work_sync+0xbe/0x110 [ 73.566992][ T5327] smc_clcsock_release+0x60/0xf0 [ 73.567004][ T5327] __smc_release+0x66b/0x7e0 [ 73.567015][ T5327] ? __local_bh_enable_ip+0xd0/0x130 [ 73.567025][ T5327] smc_close_non_accepted+0xd5/0x1f0 [ 73.567038][ T5327] smc_close_active+0xb67/0xf10 [ 73.567047][ T5327] ? __pfx_sock_def_readable+0x10/0x10 [ 73.567058][ T5327] __smc_release+0x8d/0x7e0 [ 73.567069][ T5327] ? __local_bh_enable_ip+0xd0/0x130 [ 73.567078][ T5327] smc_release+0x2ce/0x560 [ 73.567090][ T5327] sock_close+0xc3/0x240 [ 73.567100][ T5327] ? __pfx_sock_close+0x10/0x10 [ 73.567108][ T5327] __fput+0x44f/0xa60 [ 73.567121][ T5327] task_work_run+0x1d9/0x270 [ 73.567134][ T5327] ? __pfx_task_work_run+0x10/0x10 [ 73.567154][ T5327] exit_to_user_mode_loop+0x193/0x680 [ 73.567163][ T5327] ? rcu_is_watching+0x15/0xb0 [ 73.567174][ T5327] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 73.567185][ T5327] do_syscall_64+0x353/0x580 [ 73.567196][ T5327] ? clear_bhb_loop+0x40/0x90 [ 73.567207][ T5327] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 73.567217][ T5327] RIP: 0033:0x7fe964b9ce59 [ 73.567228][ T5327] 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 [ 73.567235][ T5327] RSP: 002b:00007ffcf73e31b8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 [ 73.567246][ T5327] RAX: 0000000000000000 RBX: 00007fe964e17da0 RCX: 00007fe964b9ce59 [ 73.567253][ T5327] RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 [ 73.567258][ T5327] RBP: 00007fe964e17da0 R08: 00007fe964e16038 R09: 0000000000000000 [ 73.567264][ T5327] R10: 0000000000df5f18 R11: 0000000000000246 R12: 000000000001211b [ 73.567269][ T5327] R13: 00007fe964e15fac R14: 0000000000011e20 R15: 00007ffcf73e32c0 [ 73.567279][ T5327]