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: 183d, last: now
Cause bisection: failed (error log, bisect log)
  
Discussions (6)
Title Replies (including bot) Last reply
[syzbot] Monthly s390 report (Dec 2024) 0 (1) 2024/12/05 09:07
[syzbot] Monthly net report (Dec 2024) 0 (1) 2024/12/05 09:04
[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 1108d 1127d 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 (9592):
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/12/21 08:50 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/21 06:35 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/21 01:56 upstream e9b8ffafd20a d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/20 20:47 upstream e9b8ffafd20a 49cfeac8 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/20 16:57 upstream 8faabc041a00 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in smc_switch_to_fallback
2024/12/20 12:00 upstream 8faabc041a00 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in smc_switch_to_fallback
2024/12/20 10:18 upstream 8faabc041a00 49cfeac8 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/20 06:39 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/20 05:25 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/20 02:35 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/19 23:51 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 21:39 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in smc_switch_to_fallback
2024/12/19 20:00 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in smc_switch_to_fallback
2024/12/19 17:14 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto possible deadlock in smc_switch_to_fallback
2024/12/19 15:38 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in smc_switch_to_fallback
2024/12/21 13:03 upstream 499551201b5f d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/21 13:00 upstream 499551201b5f d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/21 11:33 upstream 499551201b5f d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/21 03:21 upstream e9b8ffafd20a 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/20 21:48 upstream e9b8ffafd20a 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/20 21:48 upstream e9b8ffafd20a 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/20 14:21 upstream 8faabc041a00 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/20 13:06 upstream 8faabc041a00 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/20 09:04 upstream 8faabc041a00 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/19 14:21 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/19 10:48 upstream eabcdba3ad40 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/19 07:13 upstream c061cf420ded 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in smc_switch_to_fallback
2024/12/04 01:56 upstream ceb8bf2ceaa7 b50eb251 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in smc_switch_to_fallback
2024/12/20 00:12 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in smc_switch_to_fallback
2024/12/19 22:46 upstream 8faabc041a00 c87fa8a3 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in smc_switch_to_fallback
2024/12/19 11:55 upstream eabcdba3ad40 1d58202c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in smc_switch_to_fallback
2024/12/18 06:51 net 954a2b40719a a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 14:08 net-next ae418e95dd93 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 09:52 net-next ae418e95dd93 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 07:49 net-next ae418e95dd93 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 04:33 net-next 3272040790eb 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 02:57 net-next 3272040790eb 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/21 00:32 net-next 3272040790eb 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 23:27 net-next 3272040790eb 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 19:07 net-next b73e56f16250 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 15:32 net-next b73e56f16250 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 14:09 net-next b73e56f16250 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 10:53 net-next b73e56f16250 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 07:51 net-next b73e56f16250 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 04:09 net-next 6b3099ebca13 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 03:41 net-next 6b3099ebca13 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/20 01:15 net-next 6b3099ebca13 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 20:24 net-next 6b3099ebca13 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 14:22 net-next 4fefbc66dfb3 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 13:04 net-next 4fefbc66dfb3 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 09:38 net-next 4fefbc66dfb3 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 09:36 net-next 4fefbc66dfb3 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in smc_switch_to_fallback
2024/12/19 08:33 net-next 4fefbc66dfb3 1432fc84 .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/12/21 07:40 linux-next 8155b4ef3466 d7f584ee .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/12/19 18:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e7aff49b5da 1d58202c .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.