syzbot


possible deadlock in smc_switch_to_fallback (2)

Status: upstream: reported C repro on 2024/06/24 15:15
Subsystems: net s390
[Documentation on labels]
Reported-by: syzbot+bef85a6996d1737c1a2f@syzkaller.appspotmail.com
First crash: 153d, last: 38m
Cause bisection: failed (error log, bisect log)
  
Discussions (4)
Title Replies (including bot) Last reply
[syzbot] Monthly net report (Nov 2024) 0 (1) 2024/11/04 08:49
[syzbot] Monthly net report (Oct 2024) 0 (1) 2024/10/03 09:02
[syzbot] Monthly net report (Sep 2024) 0 (1) 2024/09/02 08:21
[syzbot] [net?] [s390?] possible deadlock in smc_switch_to_fallback (2) 0 (2) 2024/07/27 17:46
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in smc_switch_to_fallback net s390 43575 1077d 1097d 20/28 fixed on 2022/03/08 16:11

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.11.0-rc4-syzkaller-00686-ge24a6c874601 #0 Not tainted
------------------------------------------------------
syz-executor389/5229 is trying to acquire lock:
ffff8880124c0a50 (&smc->clcsock_release_lock){+.+.}-{3:3}, at: smc_switch_to_fallback+0x35/0xdb0 net/smc/af_smc.c:902

but task is already holding lock:
ffff8880124c0258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
ffff8880124c0258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_sendmsg+0x55/0x530 net/smc/af_smc.c:2765

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (sk_lock-AF_INET6){+.+.}-{0:0}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
       lock_sock_nested+0x48/0x100 net/core/sock.c:3543
       do_ipv6_setsockopt+0xbf3/0x3630 net/ipv6/ipv6_sockglue.c:567
       ipv6_setsockopt+0x5d/0x170 net/ipv6/ipv6_sockglue.c:993
       do_sock_setsockopt+0x3af/0x720 net/socket.c:2324
       __sys_setsockopt+0x1ae/0x250 net/socket.c:2347
       __do_sys_setsockopt net/socket.c:2356 [inline]
       __se_sys_setsockopt net/socket.c:2353 [inline]
       __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2353
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (rtnl_mutex){+.+.}-{3:3}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
       __mutex_lock_common kernel/locking/mutex.c:608 [inline]
       __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
       ip_mroute_setsockopt+0x15b/0x1190 net/ipv4/ipmr.c:1370
       do_ip_setsockopt+0x129f/0x3cd0 net/ipv4/ip_sockglue.c:948
       ip_setsockopt+0x63/0x100 net/ipv4/ip_sockglue.c:1417
       smc_setsockopt+0x275/0xe50 net/smc/af_smc.c:3064
       do_sock_setsockopt+0x3af/0x720 net/socket.c:2324
       __sys_setsockopt+0x1ae/0x250 net/socket.c:2347
       __do_sys_setsockopt net/socket.c:2356 [inline]
       __se_sys_setsockopt net/socket.c:2353 [inline]
       __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2353
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&smc->clcsock_release_lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3133 [inline]
       check_prevs_add kernel/locking/lockdep.c:3252 [inline]
       validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868
       __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
       __mutex_lock_common kernel/locking/mutex.c:608 [inline]
       __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
       smc_switch_to_fallback+0x35/0xdb0 net/smc/af_smc.c:902
       smc_sendmsg+0x11f/0x530 net/smc/af_smc.c:2771
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg+0x221/0x270 net/socket.c:745
       __sys_sendto+0x3a4/0x4f0 net/socket.c:2204
       __do_sys_sendto net/socket.c:2216 [inline]
       __se_sys_sendto net/socket.c:2212 [inline]
       __x64_sys_sendto+0xde/0x100 net/socket.c:2212
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &smc->clcsock_release_lock --> rtnl_mutex --> sk_lock-AF_INET6

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET6);
                               lock(rtnl_mutex);
                               lock(sk_lock-AF_INET6);
  lock(&smc->clcsock_release_lock);

 *** DEADLOCK ***

1 lock held by syz-executor389/5229:
 #0: ffff8880124c0258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1607 [inline]
 #0: ffff8880124c0258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_sendmsg+0x55/0x530 net/smc/af_smc.c:2765

stack backtrace:
CPU: 1 UID: 0 PID: 5229 Comm: syz-executor389 Not tainted 6.11.0-rc4-syzkaller-00686-ge24a6c874601 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
 check_noncircular+0x36a/0x4a0 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+0x18e0/0x5900 kernel/locking/lockdep.c:3868
 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
 smc_switch_to_fallback+0x35/0xdb0 net/smc/af_smc.c:902
 smc_sendmsg+0x11f/0x530 net/smc/af_smc.c:2771
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 __sys_sendto+0x3a4/0x4f0 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __x64_sys_sendto+0xde/0x100 net/socket.c:2212
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7242bc4a79
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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:00007ffeaf469a78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7242bc4a79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f7242c375f0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000008 R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (6121):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/29 15:07 net-next e24a6c874601 ef3de9e8 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/08/03 23:58 net-next c4b28e5699d2 1786a2a8 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/07/27 17:45 net-next 1722389b0d86 46eb10b7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/09/27 22:05 upstream e477dba5442c 2b1784d6 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/21 01:58 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/20 23:29 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/20 20:57 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in smc_switch_to_fallback
2024/11/20 17:34 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in smc_switch_to_fallback
2024/11/20 16:22 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in smc_switch_to_fallback
2024/11/20 05:10 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in smc_switch_to_fallback
2024/11/20 01:54 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/19 22:46 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/19 21:25 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/19 18:55 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/19 15:49 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/19 15:49 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/19 14:11 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/19 11:45 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in smc_switch_to_fallback
2024/11/19 03:47 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in smc_switch_to_fallback
2024/11/19 02:33 upstream adc218676eef 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in smc_switch_to_fallback
2024/11/19 01:24 upstream adc218676eef 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in smc_switch_to_fallback
2024/11/18 22:30 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/18 14:35 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/11/18 08:18 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/18 03:37 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/17 22:12 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/21 05:17 upstream 43fb83c17ba2 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 22:03 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 19:56 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 18:51 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 11:38 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 10:27 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 09:14 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 03:25 upstream a5c93bfec0be 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 23:59 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 20:30 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 17:52 upstream 158f238aa69d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 13:10 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 10:44 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 09:44 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/19 07:06 upstream c6d64479d609 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/18 23:47 upstream adc218676eef 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/17 23:40 upstream f66d6acccbc0 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/11/20 14:13 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in smc_switch_to_fallback
2024/11/19 01:23 upstream 9fb2cfa4635a 571351cb .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in smc_switch_to_fallback
2024/11/20 15:13 net 66418447d27b 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/20 07:02 net 66418447d27b 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/18 15:41 net 8ffade77b633 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/18 01:01 net 8ffade77b633 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/21 06:08 net-next dd7207838d38 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/20 08:01 net-next dd7207838d38 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/17 21:00 net-next 38f83a57aa8e cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/17 20:19 net-next 38f83a57aa8e cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/07/24 03:09 net-next 58f9416d413a e50e8da5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-net-next-test-gce possible deadlock in smc_switch_to_fallback
2024/06/24 13:42 net-next 568ebdaba637 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/06/21 05:58 net-next a6ec08beec9e dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/11/11 23:19 linux-next 929beafbe7ac 97fe5517 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in smc_switch_to_fallback
2024/11/18 19:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in smc_switch_to_fallback
2024/11/18 07:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 887407160d72 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in smc_switch_to_fallback
2024/11/18 05:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 887407160d72 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in smc_switch_to_fallback
2024/11/18 02:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 887407160d72 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in smc_switch_to_fallback
* Struck through repros no longer work on HEAD.