syzbot


possible deadlock in smc_vlan_by_tcpsk

Status: upstream: reported C repro on 2024/06/26 19:15
Subsystems: s390 net
[Documentation on labels]
Reported-by: syzbot+c75d1de73d3b8b76272f@syzkaller.appspotmail.com
First crash: 151d, last: 27m
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 (1747):
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/11/21 04:59 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/21 03:09 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 22:27 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 21:56 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 20:48 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 19:34 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 18:01 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 16:12 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 11:37 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 09:58 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 06:27 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/20 00:09 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 20:36 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 18:33 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 16:43 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 15:37 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 13:26 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 10:57 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 08:58 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 07:20 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 06:09 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 04:38 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 02:38 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/19 01:04 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 23:49 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 19:56 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 19:29 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 17:34 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 16:13 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 15:05 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 13:17 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 11:57 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 08:19 upstream adc218676eef cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 06:16 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 05:58 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 03:43 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 01:29 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/18 00:03 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/17 22:28 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/17 21:12 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/17 20:18 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/11/17 17:15 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_vlan_by_tcpsk
2024/10/18 01:51 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root 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/11/20 05:00 upstream 158f238aa69d 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in smc_vlan_by_tcpsk
2024/11/20 02:23 upstream 158f238aa69d 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in smc_vlan_by_tcpsk
2024/11/20 02:23 upstream 158f238aa69d 7d02db5a .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in smc_vlan_by_tcpsk
2024/10/17 22:57 upstream 6efbea77b390 666f77ed .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/11/18 10:47 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_vlan_by_tcpsk
2024/11/17 10:01 net-next 38f83a57aa8e cfe3a04a .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
2024/10/18 04:50 linux-next 15e7d45e786a 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in smc_vlan_by_tcpsk
* Struck through repros no longer work on HEAD.