====================================================== WARNING: possible circular locking dependency detected 6.1.119-syzkaller #0 Not tainted ------------------------------------------------------ syz.4.469/5920 is trying to acquire lock: ffff0000dd8c9450 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xd0/0x1c0 kernel/workqueue.c:3072 but task is already holding lock: ffff0000dd8c8130 (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+0x78/0x138 net/core/sock.c:3485 smc_listen_out+0x10c/0x3bc net/smc/af_smc.c:1864 smc_listen_work+0x1e4/0x102c process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 -> #0 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __flush_work+0xf8/0x1c0 kernel/workqueue.c:3072 __cancel_work_timer+0x3ec/0x548 kernel/workqueue.c:3163 cancel_work_sync+0x24/0x38 kernel/workqueue.c:3199 smc_clcsock_release+0x64/0xec net/smc/smc_close.c:29 __smc_release+0x55c/0x700 net/smc/af_smc.c:300 smc_close_non_accepted+0xd8/0x260 net/smc/af_smc.c:1798 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:276 smc_release+0x260/0x528 net/smc/af_smc.c:343 __sock_release net/socket.c:654 [inline] sock_close+0xb8/0x1fc net/socket.c:1400 __fput+0x1c8/0x7c8 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x240/0x2f0 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x554/0x1a88 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1021 get_signal+0x14a0/0x158c kernel/signal.c:2871 do_signal arch/arm64/kernel/signal.c:1076 [inline] do_notify_resume+0x388/0x2cb8 arch/arm64/kernel/signal.c:1129 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 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.4.469/5920: #0: ffff0000df2c2610 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #0: ffff0000df2c2610 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:653 [inline] #0: ffff0000df2c2610 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x80/0x1fc net/socket.c:1400 #1: ffff0000dd8c8130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x1e8/0x528 stack backtrace: CPU: 0 PID: 5920 Comm: syz.4.469 Not tainted 6.1.119-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2048 check_noncircular+0x2cc/0x378 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x3338/0x7680 kernel/locking/lockdep.c:5049 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __flush_work+0xf8/0x1c0 kernel/workqueue.c:3072 __cancel_work_timer+0x3ec/0x548 kernel/workqueue.c:3163 cancel_work_sync+0x24/0x38 kernel/workqueue.c:3199 smc_clcsock_release+0x64/0xec net/smc/smc_close.c:29 __smc_release+0x55c/0x700 net/smc/af_smc.c:300 smc_close_non_accepted+0xd8/0x260 net/smc/af_smc.c:1798 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:276 smc_release+0x260/0x528 net/smc/af_smc.c:343 __sock_release net/socket.c:654 [inline] sock_close+0xb8/0x1fc net/socket.c:1400 __fput+0x1c8/0x7c8 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x240/0x2f0 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x554/0x1a88 kernel/exit.c:871 do_group_exit+0x194/0x22c kernel/exit.c:1021 get_signal+0x14a0/0x158c kernel/signal.c:2871 do_signal arch/arm64/kernel/signal.c:1076 [inline] do_notify_resume+0x388/0x2cb8 arch/arm64/kernel/signal.c:1129 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585