MPTCP: kernel_bind error, err=-98 ============================================ WARNING: possible recursive locking detected 5.15.0-rc1-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/9164 is trying to acquire lock: ffff888071863be0 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_close+0x211/0x670 net/mptcp/protocol.c:2738 but task is already holding lock: ffff88807a998c60 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1612 [inline] ffff88807a998c60 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_close+0x1b/0x670 net/mptcp/protocol.c:2720 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(k-sk_lock-AF_INET); lock(k-sk_lock-AF_INET); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor.2/9164: #0: ffffffff8c2b6e90 (cb_lock){++++}-{3:3}, at: genl_rcv+0x10/0x30 net/netlink/genetlink.c:802 #1: ffffffff8c2b6f48 (genl_mutex){+.+.}-{3:3}, at: genl_lock net/netlink/genetlink.c:33 [inline] #1: ffffffff8c2b6f48 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x315/0x4a0 net/netlink/genetlink.c:790 #2: ffff88807a998c60 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1612 [inline] #2: ffff88807a998c60 (k-sk_lock-AF_INET){+.+.}-{0:0}, at: mptcp_close+0x1b/0x670 net/mptcp/protocol.c:2720 stack backtrace: CPU: 0 PID: 9164 Comm: syz-executor.2 Not tainted 5.15.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2944 [inline] check_deadlock kernel/locking/lockdep.c:2987 [inline] validate_chain kernel/locking/lockdep.c:3776 [inline] __lock_acquire.cold+0x229/0x3ab kernel/locking/lockdep.c:5015 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 lock_sock_fast+0x2d/0xe0 net/core/sock.c:3229 mptcp_close+0x211/0x670 net/mptcp/protocol.c:2738 inet_release+0xef/0x210 net/ipv4/af_inet.c:431 __sock_release net/socket.c:649 [inline] sock_release+0x7d/0x190 net/socket.c:677 mptcp_pm_nl_create_listen_socket+0x1f7/0x270 net/mptcp/pm_netlink.c:900 mptcp_nl_cmd_add_addr+0x2e2/0x790 net/mptcp/pm_netlink.c:1170 genl_family_rcv_msg_doit+0x1e4/0x2f0 net/netlink/genetlink.c:731 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] genl_rcv_msg+0x27a/0x4a0 net/netlink/genetlink.c:792 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 genl_rcv+0x1f/0x30 net/netlink/genetlink.c:803 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 sock_no_sendpage+0xf5/0x140 net/core/sock.c:2980 kernel_sendpage.part.0+0x11e/0x240 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xc7/0x1a0 net/socket.c:1003 pipe_to_sendpage+0x245/0x410 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x362/0x810 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xba/0x120 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xfb/0x1c0 fs/splice.c:936 splice_direct_to_actor+0x2dd/0x7c0 fs/splice.c:891 do_splice_direct+0x154/0x260 fs/splice.c:979 do_sendfile+0x91e/0x1120 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1314 [inline] __se_sys_sendfile64 fs/read_write.c:1300 [inline] __x64_sys_sendfile64+0x186/0x1d0 fs/read_write.c:1300 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f8fd3c23739 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8fd339a188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f8fd3d27f80 RCX: 00007f8fd3c23739 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000005 RBP: 00007f8fd3c7dcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000100000002 R11: 0000000000000246 R12: 00007f8fd3d27f80 R13: 00007ffda53d2e6f R14: 00007f8fd339a300 R15: 0000000000022000