program: r0 = socket(0xa, 0x2, 0x0) setsockopt$inet_MCAST_MSFILTER(r0, 0x0, 0x30, 0x0, 0x0) socket$nl_netfilter(0x10, 0x3, 0xc) (async) r1 = socket$nl_netfilter(0x10, 0x3, 0xc) sendmsg$IPSET_CMD_SAVE(r1, &(0x7f0000000180)={&(0x7f0000000080)={0x10, 0x0, 0x0, 0x200000}, 0xc, &(0x7f0000000140)={&(0x7f0000000100)={0x1c, 0x8, 0x6, 0x801, 0x0, 0x0, {0x0, 0x0, 0x1}, [@IPSET_ATTR_PROTOCOL={0x5}]}, 0x1c}, 0x1, 0x0, 0x0, 0x8000}, 0x24004000) sendmsg$NFT_BATCH(r1, &(0x7f00000000c0)={0x0, 0x0, &(0x7f0000000040)={&(0x7f0000000380)=ANY=[@ANYBLOB="140000001000010000000000000000000000000a20000000000a01080000000000000000010000000900010073797a300000000040000000030a01080000000000000000010000000900030073797a320000000014000480080002400000000008000140000000030900010073797a300000004064000000060a01040000000000000000010000000900020073797a32000000000900010073797a300000000038000480340001800c0001007061796c6f61640024000280080001400000000e08000440000000040800024000000000080003400000008414000000110001"], 0xec}, 0x1, 0x0, 0x0, 0x20050000}, 0x8090) r2 = socket$inet_smc(0x2b, 0x1, 0x0) bind$inet(r2, &(0x7f0000000c00)={0x2, 0x4e20, @loopback}, 0x10) listen(r2, 0x10) r3 = socket$inet_smc(0x2b, 0x1, 0x0) connect$inet(r3, &(0x7f0000000d00)={0x2, 0x4e20, @loopback}, 0x10) (async) connect$inet(r3, &(0x7f0000000d00)={0x2, 0x4e20, @loopback}, 0x10) add_key(&(0x7f0000000000)='rxrpc\x00', 0x0, &(0x7f0000000200)="000000000000000463656c6c000000020000004400000006000000000000000002000000000000000000000000000000000000000000000000ffffffffffffffa30000000000000000000004000000000000000400000000000000140000000200"/112, 0x70, 0xffffffffffffffff) (async) add_key(&(0x7f0000000000)='rxrpc\x00', 0x0, &(0x7f0000000200)="000000000000000463656c6c000000020000004400000006000000000000000002000000000000000000000000000000000000000000000000ffffffffffffffa30000000000000000000004000000000000000400000000000000140000000200"/112, 0x70, 0xffffffffffffffff) [ 93.135038][ T5282] Bluetooth: hci0: command tx timeout [ 93.156804][ T2002] cfg80211: failed to load regulatory.db [ 93.297514][ T5317] [ 93.298618][ T5317] ====================================================== [ 93.302610][ T5317] WARNING: possible circular locking dependency detected [ 93.305888][ T5317] syzkaller #0 Not tainted [ 93.307792][ T5317] ------------------------------------------------------ [ 93.310621][ T5317] syz.0.0/5317 is trying to acquire lock: [ 93.312899][ T5317] ffff88801c337ae8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0x101/0xca0 [ 93.318060][ T5317] [ 93.318060][ T5317] but task is already holding lock: [ 93.321078][ T5317] ffff888013108ee0 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x24d/0x550 [ 93.325139][ T5317] [ 93.325139][ T5317] which lock already depends on the new lock. [ 93.325139][ T5317] [ 93.329413][ T5317] [ 93.329413][ T5317] the existing dependency chain (in reverse order) is: [ 93.333106][ T5317] [ 93.333106][ T5317] -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: [ 93.336501][ T5317] lock_sock_nested+0x41/0x100 [ 93.338742][ T5317] smc_listen_out+0xd4/0x3d0 [ 93.340952][ T5317] smc_listen_work+0x81d/0x1410 [ 93.343253][ T5317] process_scheduled_works+0xc3d/0x1630 [ 93.345864][ T5317] worker_thread+0xa47/0xfb0 [ 93.347996][ T5317] kthread+0x38b/0x480 [ 93.349995][ T5317] ret_from_fork+0x514/0xb70 [ 93.352178][ T5317] ret_from_fork_asm+0x1a/0x30 [ 93.354287][ T5317] [ 93.354287][ T5317] -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: [ 93.358367][ T5317] __lock_acquire+0x164c/0x2de0 [ 93.360480][ T5317] lock_acquire+0x115/0x350 [ 93.362597][ T5317] __flush_work+0x74c/0xca0 [ 93.364653][ T5317] __cancel_work_sync+0xbf/0x110 [ 93.366874][ T5317] smc_clcsock_release+0x60/0xf0 [ 93.368972][ T5317] __smc_release+0x64e/0x7c0 [ 93.371016][ T5317] smc_close_non_accepted+0xd5/0x1f0 [ 93.373587][ T5317] smc_close_active+0xb30/0xf20 [ 93.375964][ T5317] __smc_release+0x9c/0x7c0 [ 93.378212][ T5317] smc_release+0x2c5/0x550 [ 93.380359][ T5317] __sock_release+0xa0/0x1f0 [ 93.382584][ T5317] sock_close+0x1c/0x30 [ 93.384676][ T5317] __fput+0x418/0xa50 [ 93.387061][ T5317] task_work_run+0x1d9/0x270 [ 93.389903][ T5317] exit_to_user_mode_loop+0x204/0x770 [ 93.392501][ T5317] do_syscall_64+0x328/0x520 [ 93.394726][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 93.397522][ T5317] [ 93.397522][ T5317] other info that might help us debug this: [ 93.397522][ T5317] [ 93.401883][ T5317] Possible unsafe locking scenario: [ 93.401883][ T5317] [ 93.405342][ T5317] CPU0 CPU1 [ 93.407595][ T5317] ---- ---- [ 93.409868][ T5317] lock(sk_lock-AF_SMC/1); [ 93.411863][ T5317] lock((work_completion)(&new_smc->smc_listen_work)); [ 93.415933][ T5317] lock(sk_lock-AF_SMC/1); [ 93.418947][ T5317] lock((work_completion)(&new_smc->smc_listen_work)); [ 93.421996][ T5317] [ 93.421996][ T5317] *** DEADLOCK *** [ 93.421996][ T5317] [ 93.425468][ T5317] locks held by syz.0.0/5317: 3, last CPU#0: [ 93.428054][ T5317] #0: ffff88804201d940 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: __sock_release+0x7a/0x1f0 [ 93.432510][ T5317] #1: ffff888013108ee0 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x24d/0x550 [ 93.436480][ T5317] #2: ffffffff8ed5c8a0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x101/0xca0 [ 93.440324][ T5317] [ 93.440324][ T5317] stack backtrace: [ 93.442821][ T5317] CPU: 0 UID: 0 PID: 5317 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 93.446612][ T5317] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 93.450929][ T5317] Call Trace: [ 93.452443][ T5317] [ 93.453846][ T5317] dump_stack_lvl+0xe8/0x150 [ 93.456367][ T5317] print_circular_bug+0x2e2/0x300 [ 93.458724][ T5317] check_noncircular+0x12f/0x150 [ 93.460856][ T5317] __lock_acquire+0x164c/0x2de0 [ 93.462973][ T5317] ? do_raw_spin_unlock+0x4d/0x200 [ 93.465545][ T5317] lock_acquire+0x115/0x350 [ 93.467952][ T5317] ? __flush_work+0x101/0xca0 [ 93.470425][ T5317] ? __flush_work+0x101/0xca0 [ 93.472640][ T5317] __flush_work+0x74c/0xca0 [ 93.474650][ T5317] ? __flush_work+0x101/0xca0 [ 93.476650][ T5317] ? __flush_work+0x101/0xca0 [ 93.478726][ T5317] ? __pfx___flush_work+0x10/0x10 [ 93.480980][ T5317] ? __pfx_wq_barrier_func+0x10/0x10 [ 93.483202][ T5317] ? __cancel_work_sync+0x5c/0x110 [ 93.485370][ T5317] __cancel_work_sync+0xbf/0x110 [ 93.487382][ T5317] smc_clcsock_release+0x60/0xf0 [ 93.489471][ T5317] __smc_release+0x64e/0x7c0 [ 93.491544][ T5317] smc_close_non_accepted+0xd5/0x1f0 [ 93.493735][ T5317] smc_close_active+0xb30/0xf20 [ 93.495916][ T5317] ? __pfx_sock_def_readable+0x10/0x10 [ 93.498274][ T5317] __smc_release+0x9c/0x7c0 [ 93.500236][ T5317] ? __local_bh_enable_ip+0xd6/0x140 [ 93.502505][ T5317] smc_release+0x2c5/0x550 [ 93.504400][ T5317] __sock_release+0xa0/0x1f0 [ 93.506311][ T5317] ? __pfx_sock_close+0x10/0x10 [ 93.508385][ T5317] sock_close+0x1c/0x30 [ 93.510234][ T5317] __fput+0x418/0xa50 [ 93.511998][ T5317] task_work_run+0x1d9/0x270 [ 93.513977][ T5317] ? __pfx_task_work_run+0x10/0x10 [ 93.516067][ T5317] exit_to_user_mode_loop+0x204/0x770 [ 93.518353][ T5317] ? rcu_is_watching+0x16/0xb0 [ 93.520454][ T5317] do_syscall_64+0x328/0x520 [ 93.522430][ T5317] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 93.524946][ T5317] ? clear_bhb_loop+0x70/0xc0 [ 93.526982][ T5317] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 93.529433][ T5317] RIP: 0033:0x7fbba0f9e159 [ 93.531273][ T5317] 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 [ 93.539415][ T5317] RSP: 002b:00007ffe66ec42d8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 [ 93.543696][ T5317] RAX: 0000000000000000 RBX: 00007fbba1227da0 RCX: 00007fbba0f9e159 [ 93.546997][ T5317] RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 [ 93.550151][ T5317] RBP: 00007fbba1227da0 R08: 0000000000000006 R09: 0000000000000000 [ 93.553181][ T5317] R10: 0000000000dffd3c R11: 0000000000000246 R12: 0000000000016e69 [ 93.556275][ T5317] R13: 00007fbba122609c R14: 0000000000016bfb R15: 00007fbba1226090 [ 93.560047][ T5317]