syzbot


possible deadlock in smc_release

Status: upstream: reported C repro on 2024/01/29 16:17
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+edf7d3f5c58c3780ff30@syzkaller.appspotmail.com
First crash: 480d, last: 21h05m
Bug presence (3)
Date Name Commit Repro Result
2024/06/12 linux-6.1.y (ToT) 88690811da69 C [report] possible deadlock in smc_release
2024/01/29 upstream (ToT) 41bccc98fb79 C [report] possible deadlock in smc_release
2024/06/11 upstream (ToT) 83a7eefedc9b C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in smc_release origin:upstream missing-backport C error 434 19h47m 241d 0/3 upstream: reported C repro on 2024/09/24 05:56
upstream possible deadlock in smc_release smc C error 87 30m 476d 0/28 upstream: reported C repro on 2024/02/02 13:26
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2024/08/30 23:31 59m bisect fix linux-6.1.y OK (0) job log log
2024/07/24 03:35 3h59m fix candidate upstream OK (0) job log log
2024/05/14 06:47 1h03m bisect fix linux-6.1.y OK (0) job log log
2024/04/07 11:48 1h10m bisect fix linux-6.1.y OK (0) job log log
2024/03/08 02:31 2h05m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
netdevsim netdevsim0 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
======================================================
WARNING: possible circular locking dependency detected
6.1.135-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor345/4247 is trying to acquire lock:
ffff88802f850910 ((work_completion)(&new_smc->smc_listen_work)){+.+.}-{0:0}, at: __flush_work+0xd4/0xa60 kernel/workqueue.c:3072

but task is already holding lock:
ffff8880773f8130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x251/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+0x44/0x100 net/core/sock.c:3488
       smc_listen_out+0x109/0x3d0 net/smc/af_smc.c:1865
       process_one_work+0x898/0x1160 kernel/workqueue.c:2292
       worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
       kthread+0x29d/0x330 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

-> #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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
       lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
       __flush_work+0xed/0xa60 kernel/workqueue.c:3072
       __cancel_work_timer+0x3ac/0x520 kernel/workqueue.c:3163
       smc_clcsock_release+0x5c/0xe0 net/smc/smc_close.c:29
       __smc_release+0x661/0x7d0 net/smc/af_smc.c:300
       smc_close_non_accepted+0xd1/0x1f0 net/smc/af_smc.c:1798
       smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
       smc_close_active+0xb00/0xea0 net/smc/smc_close.c:225
       __smc_release+0x8d/0x7d0 net/smc/af_smc.c:276
       smc_release+0x2ca/0x530 net/smc/af_smc.c:343
       __sock_release net/socket.c:654 [inline]
       sock_close+0xd5/0x240 net/socket.c:1400
       __fput+0x22c/0x920 fs/file_table.c:320
       task_work_run+0x1ca/0x250 kernel/task_work.c:203
       exit_task_work include/linux/task_work.h:39 [inline]
       do_exit+0x936/0x2400 kernel/exit.c:871
       do_group_exit+0x217/0x2d0 kernel/exit.c:1021
       __do_sys_exit_group kernel/exit.c:1032 [inline]
       __se_sys_exit_group kernel/exit.c:1030 [inline]
       __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
       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 ***

2 locks held by syz-executor345/4247:
 #0: ffff888072779410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #0: ffff888072779410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:653 [inline]
 #0: ffff888072779410 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1400
 #1: ffff8880773f8130 (sk_lock-AF_SMC/1){+.+.}-{0:0}, at: smc_release+0x251/0x530 net/smc/af_smc.c:-1

stack backtrace:
CPU: 1 PID: 4247 Comm: syz-executor345 Not tainted 6.1.135-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 check_noncircular+0x274/0x310 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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
 __flush_work+0xed/0xa60 kernel/workqueue.c:3072
 __cancel_work_timer+0x3ac/0x520 kernel/workqueue.c:3163
 smc_clcsock_release+0x5c/0xe0 net/smc/smc_close.c:29
 __smc_release+0x661/0x7d0 net/smc/af_smc.c:300
 smc_close_non_accepted+0xd1/0x1f0 net/smc/af_smc.c:1798
 smc_close_cleanup_listen net/smc/smc_close.c:45 [inline]
 smc_close_active+0xb00/0xea0 net/smc/smc_close.c:225
 __smc_release+0x8d/0x7d0 net/smc/af_smc.c:276
 smc_release+0x2ca/0x530 net/smc/af_smc.c:343
 __sock_release net/socket.c:654 [inline]
 sock_close+0xd5/0x240 net/socket.c:1400
 __fput+0x22c/0x920 fs/file_table.c:320
 task_work_run+0x1ca/0x250 kernel/task_work.c:203
 exit_task_work include/linux/task_work.h:39 [inline]
 do_exit+0x936/0x2400 kernel/exit.c:871
 do_group_exit+0x217/0x2d0 kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f594b9c78e9
Code: Unable to access opcode bytes at 0x7f594b9c78bf.
RSP: 002b:00007fff6de6d728 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f594b9c78e9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f594ba47390 R08: ffffffffffffffb8 R09: 0

Crashes (427):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/27 08:59 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2024/01/29 20:22 linux-6.1.y 883d1a956208 991a98f4 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/01/17 04:19 linux-6.1.y c63962be84ef f9e07a6e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2024/01/29 20:17 linux-6.1.y 883d1a956208 991a98f4 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/21 07:33 linux-6.1.y 325285d9fc86 b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/21 05:40 linux-6.1.y 325285d9fc86 b47f9e02 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/20 02:17 linux-6.1.y 325285d9fc86 b84f0537 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/19 06:26 linux-6.1.y 325285d9fc86 f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/19 04:54 linux-6.1.y 325285d9fc86 f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/19 03:02 linux-6.1.y 325285d9fc86 f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/17 22:31 linux-6.1.y 02b72ccb5f9d f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/16 19:59 linux-6.1.y 02b72ccb5f9d cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/15 00:05 linux-6.1.y 02b72ccb5f9d a4fa04ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/12 03:27 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/27 08:24 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/17 01:37 linux-6.1.y 420102835862 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/05 09:51 linux-6.1.y 8e60a714ba3b c53ea9c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/02 15:26 linux-6.1.y 8e60a714ba3b c799dfdd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/02 00:12 linux-6.1.y 8e60a714ba3b b8645499 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/04/01 10:21 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/03/31 10:38 linux-6.1.y 8e60a714ba3b d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/03/29 13:42 linux-6.1.y 8e60a714ba3b cf25e2c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/03/28 07:47 linux-6.1.y 344a09659766 6c09fb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in smc_release
2025/05/22 22:18 linux-6.1.y da3c5173c55f 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/20 02:35 linux-6.1.y 325285d9fc86 b84f0537 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/20 00:44 linux-6.1.y 325285d9fc86 b84f0537 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/19 20:29 linux-6.1.y 325285d9fc86 b84f0537 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/19 02:18 linux-6.1.y 325285d9fc86 f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/16 16:43 linux-6.1.y 02b72ccb5f9d cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/16 12:08 linux-6.1.y 02b72ccb5f9d cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/12 15:42 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/12 02:25 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/12 02:23 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/10 18:13 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/05/10 12:11 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/27 04:12 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/12 02:40 linux-6.1.y 420102835862 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/06 18:15 linux-6.1.y 8e60a714ba3b 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/05 00:58 linux-6.1.y 8e60a714ba3b 1c4febdb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/04 04:39 linux-6.1.y 8e60a714ba3b d7ae3a11 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/04 02:33 linux-6.1.y 8e60a714ba3b d7ae3a11 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/03 15:34 linux-6.1.y 8e60a714ba3b 996a9618 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/02 02:44 linux-6.1.y 8e60a714ba3b b8645499 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/02 01:40 linux-6.1.y 8e60a714ba3b b8645499 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/04/01 21:07 linux-6.1.y 8e60a714ba3b b8645499 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/03/31 19:39 linux-6.1.y 8e60a714ba3b d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/03/31 07:17 linux-6.1.y 8e60a714ba3b d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/03/30 09:56 linux-6.1.y 8e60a714ba3b d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/03/29 11:37 linux-6.1.y 8e60a714ba3b cf25e2c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2025/03/28 12:17 linux-6.1.y 344a09659766 6c09fb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
2024/01/29 16:16 linux-6.1.y 883d1a956208 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in smc_release
* Struck through repros no longer work on HEAD.