====================================================== WARNING: possible circular locking dependency detected 6.11.0-syzkaller-09959-gabf2050f51fd-dirty #0 Not tainted ------------------------------------------------------ syz.0.1105/8757 is trying to acquire lock: ffff0000d4402bc8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: touch_work_lockdep_map+0x74/0x11c kernel/workqueue.c:3895 but task is already holding lock: ffff0000d4404758 (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:3611 smc_listen_out+0x10c/0x3bc net/smc/af_smc.c:1905 smc_listen_out_connected net/smc/af_smc.c:1925 [inline] smc_listen_decline net/smc/af_smc.c:1960 [inline] smc_listen_work+0x4c8/0x1074 net/smc/af_smc.c:2549 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 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:3158 [inline] check_prevs_add kernel/locking/lockdep.c:3277 [inline] validate_chain kernel/locking/lockdep.c:3901 [inline] __lock_acquire+0x33f8/0x77c8 kernel/locking/lockdep.c:5199 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5822 touch_work_lockdep_map+0x9c/0x11c kernel/workqueue.c:3895 start_flush_work kernel/workqueue.c:4149 [inline] __flush_work+0x578/0x954 kernel/workqueue.c:4181 __cancel_work_sync kernel/workqueue.c:4337 [inline] cancel_work_sync+0xc4/0x120 kernel/workqueue.c:4374 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:1837 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:1427 __fput+0x1bc/0x75c fs/file_table.c:431 ____fput+0x20/0x30 fs/file_table.c:459 task_work_run+0x230/0x2e0 kernel/task_work.c:228 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 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 *** 3 locks held by syz.0.1105/8757: #0: ffff0000e5b6fa08 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #0: ffff0000e5b6fa08 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline] #0: ffff0000e5b6fa08 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x80/0x1e8 net/socket.c:1427 #1: ffff0000d4404758 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x1e8/0x528 #2: ffff80008dc7d020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:336 stack backtrace: CPU: 0 UID: 0 PID: 8757 Comm: syz.0.1105 Not tainted 6.11.0-syzkaller-09959-gabf2050f51fd-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x154/0x1c0 kernel/locking/lockdep.c:2074 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2203 check_prev_add kernel/locking/lockdep.c:3158 [inline] check_prevs_add kernel/locking/lockdep.c:3277 [inline] validate_chain kernel/locking/lockdep.c:3901 [inline] __lock_acquire+0x33f8/0x77c8 kernel/locking/lockdep.c:5199 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5822 touch_work_lockdep_map+0x9c/0x11c kernel/workqueue.c:3895 start_flush_work kernel/workqueue.c:4149 [inline] __flush_work+0x578/0x954 kernel/workqueue.c:4181 __cancel_work_sync kernel/workqueue.c:4337 [inline] cancel_work_sync+0xc4/0x120 kernel/workqueue.c:4374 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:1837 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:1427 __fput+0x1bc/0x75c fs/file_table.c:431 ____fput+0x20/0x30 fs/file_table.c:459 task_work_run+0x230/0x2e0 kernel/task_work.c:228 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x178/0x1f4 arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xac/0x168 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598