====================================================== WARNING: possible circular locking dependency detected 6.8.0-rc4-syzkaller-01028-g71b605d32017 #0 Not tainted ------------------------------------------------------ syz-executor.1/9863 is trying to acquire lock: ffff88802ef7a9f8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xe9/0xad0 kernel/workqueue.c:3406 but task is already holding lock: ffff8880536f6f30 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x231/0x530 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_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 lock_sock_nested+0x48/0x100 net/core/sock.c:3534 smc_listen_out+0x113/0x3d0 net/smc/af_smc.c:1915 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787 kthread+0x2ef/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 -> #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+0x18ca/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __flush_work+0x102/0xad0 kernel/workqueue.c:3406 __cancel_work_timer+0x51d/0x6b0 kernel/workqueue.c:3497 smc_clcsock_release+0x62/0xf0 net/smc/smc_close.c:29 __smc_release+0x683/0x800 net/smc/af_smc.c:301 smc_close_non_accepted+0xd8/0x1f0 net/smc/af_smc.c:1847 smc_close_cleanup_listen net/smc/smc_close.c:45 [inline] smc_close_active+0xad7/0xe90 net/smc/smc_close.c:225 __smc_release+0xa0/0x800 net/smc/af_smc.c:277 smc_release+0x2d9/0x530 net/smc/af_smc.c:344 __sock_release net/socket.c:659 [inline] sock_close+0xbc/0x240 net/socket.c:1421 __fput+0x429/0x8a0 fs/file_table.c:376 task_work_run+0x24e/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa2c/0x2740 kernel/exit.c:871 do_group_exit+0x206/0x2c0 kernel/exit.c:1020 get_signal+0x176d/0x1850 kernel/signal.c:2893 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc8/0x370 kernel/entry/common.c:212 do_syscall_64+0x108/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6f/0x77 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.1/9863: #0: ffff888050936810 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:802 [inline] #0: ffff888050936810 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline] #0: ffff888050936810 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1421 #1: ffff8880536f6f30 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x231/0x530 stack backtrace: CPU: 0 PID: 9863 Comm: syz-executor.1 Not tainted 6.8.0-rc4-syzkaller-01028-g71b605d32017 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 check_noncircular+0x36a/0x4a0 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+0x18ca/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __flush_work+0x102/0xad0 kernel/workqueue.c:3406 __cancel_work_timer+0x51d/0x6b0 kernel/workqueue.c:3497 smc_clcsock_release+0x62/0xf0 net/smc/smc_close.c:29 __smc_release+0x683/0x800 net/smc/af_smc.c:301 smc_close_non_accepted+0xd8/0x1f0 net/smc/af_smc.c:1847 smc_close_cleanup_listen net/smc/smc_close.c:45 [inline] smc_close_active+0xad7/0xe90 net/smc/smc_close.c:225 __smc_release+0xa0/0x800 net/smc/af_smc.c:277 smc_release+0x2d9/0x530 net/smc/af_smc.c:344 __sock_release net/socket.c:659 [inline] sock_close+0xbc/0x240 net/socket.c:1421 __fput+0x429/0x8a0 fs/file_table.c:376 task_work_run+0x24e/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa2c/0x2740 kernel/exit.c:871 do_group_exit+0x206/0x2c0 kernel/exit.c:1020 get_signal+0x176d/0x1850 kernel/signal.c:2893 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xc8/0x370 kernel/entry/common.c:212 do_syscall_64+0x108/0x240 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7efd3767dda9 Code: Unable to access opcode bytes at 0x7efd3767dd7f. RSP: 002b:00007efd384520c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffe00 RBX: 00007efd377abf80 RCX: 00007efd3767dda9 RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007efd376ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007efd377abf80 R15: 00007fff9cdf09c8