syzbot


BUG: sleeping function called from invalid context in __lock_sock_fast (2)

Status: fixed on 2024/04/02 11:36
Subsystems: net
[Documentation on labels]
Fix commit: d6a9608af9a7 mptcp: fix possible deadlock in subflow diag
First crash: 58d, last: 56d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in __lock_sock_fast net 2 309d 308d 23/26 fixed on 2023/09/28 17:51
linux-5.15 BUG: sleeping function called from invalid context in __lock_sock_fast origin:lts-only C error 14 3d21h 145d 0/3 upstream: reported C repro on 2023/12/03 15:34

Sample crash report:
BUG: sleeping function called from invalid context at net/core/sock.c:3553
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6163, name: syz-executor257
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<ffff8000899091c0>] spin_lock include/linux/spinlock.h:351 [inline]
[<ffff8000899091c0>] inet_diag_dump_icsk+0x2f4/0x1b94 net/ipv4/inet_diag.c:1038
CPU: 0 PID: 6163 Comm: syz-executor257 Tainted: G    B              6.8.0-rc6-syzkaller-g381f163531d8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:291
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:298
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
 dump_stack+0x1c/0x28 lib/dump_stack.c:113
 __might_resched+0x374/0x4d0 kernel/sched/core.c:10176
 __might_sleep+0x90/0xe4 kernel/sched/core.c:10105
 __lock_sock_fast+0x38/0xec net/core/sock.c:3553
 lock_sock_fast include/net/sock.h:1725 [inline]
 subflow_get_info+0x158/0xb2c net/mptcp/diag.c:28
 tcp_diag_put_ulp net/ipv4/tcp_diag.c:100 [inline]
 tcp_diag_get_aux+0x680/0x750 net/ipv4/tcp_diag.c:137
 inet_sk_diag_fill+0xd60/0x1818 net/ipv4/inet_diag.c:345
 inet_diag_dump_icsk+0x460/0x1b94 net/ipv4/inet_diag.c:1061
 tcp_diag_dump+0xb0/0xc8 net/ipv4/tcp_diag.c:188
 __inet_diag_dump+0x1e8/0x33c net/ipv4/inet_diag.c:1263
 inet_diag_dump_compat+0x17c/0x288 net/ipv4/inet_diag.c:1371
 netlink_dump+0x474/0xa8c net/netlink/af_netlink.c:2264
 __netlink_dump_start+0x4f0/0x704 net/netlink/af_netlink.c:2370
 netlink_dump_start include/linux/netlink.h:338 [inline]
 inet_diag_rcv_msg_compat+0x1cc/0x420 net/ipv4/inet_diag.c:1405
 sock_diag_rcv_msg+0x174/0x39c
 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2543
 sock_diag_rcv+0x3c/0x54 net/core/sock_diag.c:280
 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
 netlink_unicast+0x65c/0x898 net/netlink/af_netlink.c:1367
 netlink_sendmsg+0x83c/0xb20 net/netlink/af_netlink.c:1908
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x56c/0x840 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x26c/0x33c net/socket.c:2667
 __do_sys_sendmsg net/socket.c:2676 [inline]
 __se_sys_sendmsg net/socket.c:2674 [inline]
 __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2674
 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/28 23:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 d367cbe5 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
2024/03/01 19:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
2024/03/01 02:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
2024/02/29 00:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
2024/02/28 23:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
2024/02/28 22:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 381f163531d8 d367cbe5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: sleeping function called from invalid context in __lock_sock_fast
* Struck through repros no longer work on HEAD.