======================================================
WARNING: possible circular locking dependency detected
6.8.0-rc1-syzkaller-00314-g5f76499fb541 #0 Not tainted
------------------------------------------------------
syz-executor237/5059 is trying to acquire lock:
ffff888021c308f8 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xfa/0xa10 kernel/workqueue.c:3406
but task is already holding lock:
ffff88802b530130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x3a3/0x640 net/smc/af_smc.c:336
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+0x3a/0xf0 net/core/sock.c:3524
smc_listen_out+0x1e7/0x4b0 net/smc/af_smc.c:1914
smc_listen_out_connected net/smc/af_smc.c:1934 [inline]
smc_listen_decline net/smc/af_smc.c:1969 [inline]
smc_listen_work+0x4ed/0x5190 net/smc/af_smc.c:2550
process_one_work+0x886/0x15d0 kernel/workqueue.c:2633
process_scheduled_works kernel/workqueue.c:2706 [inline]
worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 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 kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x2445/0x3b30 kernel/locking/lockdep.c:5137
lock_acquire kernel/locking/lockdep.c:5754 [inline]
lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
__flush_work+0x103/0xa10 kernel/workqueue.c:3406
__cancel_work_timer+0x3ef/0x590 kernel/workqueue.c:3497
smc_clcsock_release+0x5f/0xe0 net/smc/smc_close.c:29
__smc_release+0x5b9/0x890 net/smc/af_smc.c:301
smc_close_non_accepted+0xda/0x230 net/smc/af_smc.c:1846
smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
smc_close_active+0xc2d/0x1070 net/smc/smc_close.c:225
__smc_release+0x62b/0x890 net/smc/af_smc.c:277
smc_release+0x209/0x640 net/smc/af_smc.c:344
__sock_release+0xae/0x260 net/socket.c:659
sock_close+0x1c/0x20 net/socket.c:1421
__fput+0x270/0xb70 fs/file_table.c:376
task_work_run+0x14d/0x240 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa8a/0x2ad0 kernel/exit.c:871
do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
__do_sys_exit_group kernel/exit.c:1031 [inline]
__se_sys_exit_group kernel/exit.c:1029 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
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-executor237/5059:
#0: ffff88807e4c1a10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:802 [inline]
#0: ffff88807e4c1a10 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release+0x86/0x260 net/socket.c:658
#1: ffff88802b530130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x3a3/0x640 net/smc/af_smc.c:336
stack backtrace:
CPU: 0 PID: 5059 Comm: syz-executor237 Not tainted 6.8.0-rc1-syzkaller-00314-g5f76499fb541 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
check_noncircular+0x317/0x400 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+0x2445/0x3b30 kernel/locking/lockdep.c:5137
lock_acquire kernel/locking/lockdep.c:5754 [inline]
lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
__flush_work+0x103/0xa10 kernel/workqueue.c:3406
__cancel_work_timer+0x3ef/0x590 kernel/workqueue.c:3497
smc_clcsock_release+0x5f/0xe0 net/smc/smc_close.c:29
__smc_release+0x5b9/0x890 net/smc/af_smc.c:301
smc_close_non_accepted+0xda/0x230 net/smc/af_smc.c:1846
smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
smc_close_active+0xc2d/0x1070 net/smc/smc_close.c:225
__smc_release+0x62b/0x890 net/smc/af_smc.c:277
smc_release+0x209/0x640 net/smc/af_smc.c:344
__sock_release+0xae/0x260 net/socket.c:659
sock_close+0x1c/0x20 net/socket.c:1421
__fput+0x270/0xb70 fs/file_table.c:376
task_work_run+0x14d/0x240 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa8a/0x2ad0 kernel/exit.c:871
do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
__do_sys_exit_group kernel/exit.c:1031 [inline]
__se_sys_exit_group kernel/exit.c:1029 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f32ec95d269
Code: Unable to access opcode bytes at 0x7f32ec95d23f.
RSP: 002b:00007ffc2d4ecfb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f32ec95d269
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f32ec9d42b0 R08: ffffffffffffffb8 R09: 00007ffc2d4ecee0
R10: 00007ffc2d4ecee0 R11: 0