====================================================== WARNING: possible circular locking dependency detected 5.12.0-rc4-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/10110 is trying to acquire lock: ffffffff8bfc6608 (rtnl_mutex){+.+.}-{3:3}, at: ipv6_sock_mc_close+0x9f/0xe0 net/ipv6/mcast.c:323 but task is already holding lock: ffff88802d918120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1604 [inline] (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x4a/0x120 net/mptcp/protocol.c:3550 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+0xb2/0xf0 net/core/sock.c:3065 lock_sock include/net/sock.h:1604 [inline] gtp_encap_enable_socket+0x153/0x430 drivers/net/gtp.c:824 gtp_encap_enable drivers/net/gtp.c:855 [inline] gtp_newlink+0x259/0xa50 drivers/net/gtp.c:683 __rtnl_newlink+0xcc8/0x1360 net/core/rtnetlink.c:3443 rtnl_newlink+0x5a/0x90 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x32f/0x860 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x70e/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:674 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2350 ___sys_sendmsg+0xd3/0x150 net/socket.c:2404 __sys_sendmsg+0xb2/0x140 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (rtnl_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2936 [inline] check_prevs_add kernel/locking/lockdep.c:3059 [inline] validate_chain kernel/locking/lockdep.c:3674 [inline] __lock_acquire+0x2b37/0x57d0 kernel/locking/lockdep.c:4900 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475 __mutex_lock_common kernel/locking/mutex.c:949 [inline] __mutex_lock+0x139/0x1120 kernel/locking/mutex.c:1096 ipv6_sock_mc_close+0x9f/0xe0 net/ipv6/mcast.c:323 mptcp6_release+0xa7/0x120 net/mptcp/protocol.c:3558 __sock_release+0xbb/0x270 net/socket.c:599 sock_close+0xf/0x20 net/socket.c:1258 __fput+0x209/0x870 fs/file_table.c:280 task_work_run+0xc0/0x160 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae 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 *** 2 locks held by syz-executor.1/10110: #0: ffff88802fd7b150 (&sb->s_type->i_mutex_key#13){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] #0: ffff88802fd7b150 (&sb->s_type->i_mutex_key#13){+.+.}-{3:3}, at: __sock_release+0x76/0x270 net/socket.c:598 #1: ffff88802d918120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1604 [inline] #1: ffff88802d918120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x4a/0x120 net/mptcp/protocol.c:3550 stack backtrace: CPU: 1 PID: 10110 Comm: syz-executor.1 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x93/0xc2 lib/dump_stack.c:120 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2127 check_prev_add kernel/locking/lockdep.c:2936 [inline] check_prevs_add kernel/locking/lockdep.c:3059 [inline] validate_chain kernel/locking/lockdep.c:3674 [inline] __lock_acquire+0x2b37/0x57d0 kernel/locking/lockdep.c:4900 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475 __mutex_lock_common kernel/locking/mutex.c:949 [inline] __mutex_lock+0x139/0x1120 kernel/locking/mutex.c:1096 ipv6_sock_mc_close+0x9f/0xe0 net/ipv6/mcast.c:323 mptcp6_release+0xa7/0x120 net/mptcp/protocol.c:3558 __sock_release+0xbb/0x270 net/socket.c:599 sock_close+0xf/0x20 net/socket.c:1258 __fput+0x209/0x870 fs/file_table.c:280 task_work_run+0xc0/0x160 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x41920b Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 RSP: 002b:00007ffddc39ee40 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 000000000041920b RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b309200a8 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000056c9e0 R13: 000000000056c9e0 R14: 000000000056bf60 R15: 0000000000011fbc