====================================================== WARNING: possible circular locking dependency detected 6.8.0-rc7-syzkaller-00135-g707081b61156 #0 Not tainted ------------------------------------------------------ syz-executor.0/6616 is trying to acquire lock: ffff0000c86093f8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xd0/0x1c0 kernel/workqueue.c:3406 but task is already holding lock: ffff0000c8608130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x1e8/0x528 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_SMC/1){+.+.}-{0:0}: lock_sock_nested+0x5c/0x11c net/core/sock.c:3523 smc_listen_out+0x10c/0x3bc net/smc/af_smc.c:1915 smc_listen_work+0x1e4/0xfcc process_one_work+0x694/0x1204 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2787 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x3384/0x763c kernel/locking/lockdep.c:5137 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5754 __flush_work+0xf8/0x1c0 kernel/workqueue.c:3406 __cancel_work_timer+0x3e4/0x540 kernel/workqueue.c:3497 cancel_work_sync+0x24/0x38 kernel/workqueue.c:3533 smc_clcsock_release+0x64/0xec net/smc/smc_close.c:29 __smc_release+0x55c/0x700 net/smc/af_smc.c:301 smc_close_non_accepted+0xd8/0x260 net/smc/af_smc.c:1847 smc_close_cleanup_listen net/smc/smc_close.c:45 [inline] smc_close_active+0x9bc/0xd20 net/smc/smc_close.c:225 __smc_release+0xa0/0x700 net/smc/af_smc.c:277 smc_release+0x260/0x528 net/smc/af_smc.c:344 __sock_release net/socket.c:659 [inline] sock_close+0xa4/0x1e8 net/socket.c:1421 __fput+0x30c/0x738 fs/file_table.c:376 __fput_sync+0x60/0x9c fs/file_table.c:461 __do_sys_close fs/open.c:1554 [inline] __se_sys_close fs/open.c:1539 [inline] __arm64_sys_close+0x150/0x1e0 fs/open.c:1539 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_SMC/1); lock((work_completion)(&new_smc->smc_listen_work)); lock(sk_lock-AF_SMC/1); lock((work_completion)(&new_smc->smc_listen_work)); *** DEADLOCK *** 2 locks held by syz-executor.0/6616: #0: ffff0000def4be10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] #0: ffff0000def4be10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline] #0: ffff0000def4be10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x80/0x1e8 net/socket.c:1421 #1: ffff0000c8608130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x1e8/0x528 stack backtrace: CPU: 0 PID: 6616 Comm: syz-executor.0 Not tainted 6.8.0-rc7-syzkaller-00135-g707081b61156 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2060 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x3384/0x763c kernel/locking/lockdep.c:5137 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5754 __flush_work+0xf8/0x1c0 kernel/workqueue.c:3406 __cancel_work_timer+0x3e4/0x540 kernel/workqueue.c:3497 cancel_work_sync+0x24/0x38 kernel/workqueue.c:3533 smc_clcsock_release+0x64/0xec net/smc/smc_close.c:29 __smc_release+0x55c/0x700 net/smc/af_smc.c:301 smc_close_non_accepted+0xd8/0x260 net/smc/af_smc.c:1847 smc_close_cleanup_listen net/smc/smc_close.c:45 [inline] smc_close_active+0x9bc/0xd20 net/smc/smc_close.c:225 __smc_release+0xa0/0x700 net/smc/af_smc.c:277 smc_release+0x260/0x528 net/smc/af_smc.c:344 __sock_release net/socket.c:659 [inline] sock_close+0xa4/0x1e8 net/socket.c:1421 __fput+0x30c/0x738 fs/file_table.c:376 __fput_sync+0x60/0x9c fs/file_table.c:461 __do_sys_close fs/open.c:1554 [inline] __se_sys_close fs/open.c:1539 [inline] __arm64_sys_close+0x150/0x1e0 fs/open.c:1539 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598