syzbot
possible deadlock in smc_release (2)
Status:
upstream: reported on 2026/05/22 12:09
Reported-by: syzbot+df885f0959236be11223@syzkaller.appspotmail.com
First crash: 77d, last: 17h39m
Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.3.574/8185 is trying to acquire lock:
ffff88807f191458 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
ffff88807f191458 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
ffff88807f191458 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: start_flush_work kernel/workqueue.c:3416 [inline]
ffff88807f191458 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0x120/0xac0 kernel/workqueue.c:3474
but task is already holding lock:
ffff88807a110c70 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x24d/0x530 net/smc/af_smc.c:-1
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+0x48/0x100 net/core/sock.c:3544
smc_listen_out+0x105/0x3b0 net/smc/af_smc.c:1925
smc_listen_out_connected net/smc/af_smc.c:1945 [inline]
smc_listen_decline net/smc/af_smc.c:1980 [inline]
smc_listen_work+0x580/0xf40 net/smc/af_smc.c:2577
process_one_work kernel/workqueue.c:2657 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
-> #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+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
touch_work_lockdep_map kernel/workqueue.c:3190 [inline]
start_flush_work kernel/workqueue.c:3442 [inline]
__flush_work+0x66e/0xac0 kernel/workqueue.c:3474
__cancel_work_timer+0x3f8/0x560 kernel/workqueue.c:3562
smc_clcsock_release+0x60/0xf0 net/smc/smc_close.c:29
__smc_release+0x644/0x7b0 net/smc/af_smc.c:313
smc_close_non_accepted+0xd5/0x1f0 net/smc/af_smc.c:1856
smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
smc_close_active+0xb3b/0xf20 net/smc/smc_close.c:225
__smc_release+0x9c/0x7b0 net/smc/af_smc.c:289
smc_release+0x2c5/0x530 net/smc/af_smc.c:356
__sock_release net/socket.c:659 [inline]
sock_close+0xa7/0x210 net/socket.c:1421
__fput+0x221/0x940 fs/file_table.c:418
task_work_run+0x1d4/0x260 kernel/task_work.c:245
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
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.3.574/8185:
#0: ffff8880786a9420 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#0: ffff8880786a9420 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline]
#0: ffff8880786a9420 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x82/0x210 net/socket.c:1421
#1: ffff88807a110c70 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x24d/0x530 net/smc/af_smc.c:-1
#2: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#2: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#2: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: start_flush_work kernel/workqueue.c:3416 [inline]
#2: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: __flush_work+0x120/0xac0 kernel/workqueue.c:3474
stack backtrace:
CPU: 0 PID: 8185 Comm: syz.3.574 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/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+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
touch_work_lockdep_map kernel/workqueue.c:3190 [inline]
start_flush_work kernel/workqueue.c:3442 [inline]
__flush_work+0x66e/0xac0 kernel/workqueue.c:3474
__cancel_work_timer+0x3f8/0x560 kernel/workqueue.c:3562
smc_clcsock_release+0x60/0xf0 net/smc/smc_close.c:29
__smc_release+0x644/0x7b0 net/smc/af_smc.c:313
smc_close_non_accepted+0xd5/0x1f0 net/smc/af_smc.c:1856
smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
smc_close_active+0xb3b/0xf20 net/smc/smc_close.c:225
__smc_release+0x9c/0x7b0 net/smc/af_smc.c:289
smc_release+0x2c5/0x530 net/smc/af_smc.c:356
__sock_release net/socket.c:659 [inline]
sock_close+0xa7/0x210 net/socket.c:1421
__fput+0x221/0x940 fs/file_table.c:418
task_work_run+0x1d4/0x260 kernel/task_work.c:245
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f997199e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdcf7be268 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffdcf7be350 RCX: 00007f997199e0d9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 000000000005a90b R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b2cb20000 R11: 0000000000000246 R12: 00007ffdcf7be390
R13: 00007f9971c25fac R14: 000000000005abec R15: 00007f9971c25fa0
</TASK>
* Struck through repros no longer work on HEAD.