syzbot


possible deadlock in smc_vlan_by_tcpsk

Status: upstream: reported C repro on 2024/06/26 19:15
Subsystems: net s390
[Documentation on labels]
Reported-by: syzbot+c75d1de73d3b8b76272f@syzkaller.appspotmail.com
First crash: 106d, last: 1h51m
Discussions (2)
Title Replies (including bot) Last reply
[Patch net] smc: use RCU version of lower netdev searching 10 (10) 2024/09/23 15:48
[syzbot] [net?] [s390?] possible deadlock in smc_vlan_by_tcpsk 0 (3) 2024/09/12 03:48
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/09/12 03:48 26m alibuda@linux.alibaba.com patch upstream OK log
2024/08/22 03:52 19m retest repro upstream report log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.11.0-rc2-syzkaller-00013-gd4560686726f #0 Not tainted
------------------------------------------------------
syz-executor492/5336 is trying to acquire lock:
ffffffff8fa20ee8 (rtnl_mutex){+.+.}-{3:3}, at: smc_vlan_by_tcpsk+0x251/0x620 net/smc/smc_core.c:1853

but task is already holding lock:
ffff888033d60258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
ffff888033d60258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_connect+0xd5/0x760 net/smc/af_smc.c:1650

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_INET6){+.+.}-{0:0}:
       lock_sock_nested+0x3a/0xf0 net/core/sock.c:3543
       lock_sock include/net/sock.h:1607 [inline]
       sockopt_lock_sock net/core/sock.c:1061 [inline]
       sockopt_lock_sock+0x54/0x70 net/core/sock.c:1052
       do_ipv6_setsockopt+0x216a/0x47b0 net/ipv6/ipv6_sockglue.c:567
       ipv6_setsockopt+0xe3/0x1a0 net/ipv6/ipv6_sockglue.c:993
       udpv6_setsockopt+0x7d/0xd0 net/ipv6/udp.c:1702
       do_sock_setsockopt+0x222/0x480 net/socket.c:2324
       __sys_setsockopt+0x1a4/0x270 net/socket.c:2347
       __do_sys_setsockopt net/socket.c:2356 [inline]
       __se_sys_setsockopt net/socket.c:2353 [inline]
       __x64_sys_setsockopt+0xbd/0x160 net/socket.c:2353
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (rtnl_mutex){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3133 [inline]
       check_prevs_add kernel/locking/lockdep.c:3252 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142
       lock_acquire kernel/locking/lockdep.c:5759 [inline]
       lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
       __mutex_lock_common kernel/locking/mutex.c:608 [inline]
       __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752
       smc_vlan_by_tcpsk+0x251/0x620 net/smc/smc_core.c:1853
       __smc_connect+0x44d/0x4830 net/smc/af_smc.c:1522
       smc_connect+0x2fc/0x760 net/smc/af_smc.c:1702
       __sys_connect_file+0x15f/0x1a0 net/socket.c:2061
       __sys_connect+0x149/0x170 net/socket.c:2078
       __do_sys_connect net/socket.c:2088 [inline]
       __se_sys_connect net/socket.c:2085 [inline]
       __x64_sys_connect+0x72/0xb0 net/socket.c:2085
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET6);
                               lock(rtnl_mutex);
                               lock(sk_lock-AF_INET6);
  lock(rtnl_mutex);

 *** DEADLOCK ***

1 lock held by syz-executor492/5336:
 #0: ffff888033d60258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
 #0: ffff888033d60258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_connect+0xd5/0x760 net/smc/af_smc.c:1650

stack backtrace:
CPU: 1 UID: 0 PID: 5336 Comm: syz-executor492 Not tainted 6.11.0-rc2-syzkaller-00013-gd4560686726f #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2186
 check_prev_add kernel/locking/lockdep.c:3133 [inline]
 check_prevs_add kernel/locking/lockdep.c:3252 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142
 lock_acquire kernel/locking/lockdep.c:5759 [inline]
 lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752
 smc_vlan_by_tcpsk+0x251/0x620 net/smc/smc_core.c:1853
 __smc_connect+0x44d/0x4830 net/smc/af_smc.c:1522
 smc_connect+0x2fc/0x760 net/smc/af_smc.c:1702
 __sys_connect_file+0x15f/0x1a0 net/socket.c:2061
 __sys_connect+0x149/0x170 net/socket.c:2078
 __do_sys_connect net/socket.c:2088 [inline]
 __se_sys_connect net/socket.c:2085 [inline]
 __x64_sys_connect+0x72/0xb0 net/socket.c:2085
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6fc285ad49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 1a 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeaafd57c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f6fc285ad49
RDX: 000000000000001c RSI: 0000000020000200 RDI: 0000000000000004
RBP: 00000000000f4240 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffeaafd5820
R13: 00007f6fc28a8406 R14: 0000000000000003 R15: 00007ffeaafd5800
 </TASK>

Crashes (305):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/07 08:06 upstream d4560686726f 1ef9fe42 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in smc_vlan_by_tcpsk
2024/10/07 14:51 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/07 13:29 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/07 09:13 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/07 08:31 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/07 06:31 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/07 02:05 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 21:51 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 19:38 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 17:59 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 15:35 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 13:50 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 13:42 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 12:14 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 11:00 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 09:44 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 07:16 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 05:53 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/06 03:52 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 23:29 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 17:55 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 16:02 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 15:01 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 13:49 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 11:24 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 09:23 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 07:27 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 06:18 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 04:44 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/05 01:24 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 23:47 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 21:07 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 20:42 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 19:25 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 13:06 upstream 3840cbe24cf0 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 10:09 upstream 3840cbe24cf0 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 07:56 upstream 3840cbe24cf0 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 06:01 upstream 3840cbe24cf0 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/04 04:08 upstream 3840cbe24cf0 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/03 23:58 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/03 22:02 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/03 21:00 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/03 18:57 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/03 16:03 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/09/14 01:31 upstream e936e7d4a83b 158f4851 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_vlan_by_tcpsk
2024/08/07 05:54 upstream d4560686726f 1ef9fe42 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in smc_vlan_by_tcpsk
2024/08/08 03:16 upstream 6a0e38264012 de12cf65 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in smc_vlan_by_tcpsk
2024/09/13 09:14 net 3e705251d998 73e8a465 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_vlan_by_tcpsk
2024/10/06 02:43 net-next d521db38f339 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_vlan_by_tcpsk
2024/10/04 17:56 net-next b63c755cb65d d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_vlan_by_tcpsk
2024/06/22 19:11 net-next 185d72112b95 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_vlan_by_tcpsk
* Struck through repros no longer work on HEAD.