====================================================== WARNING: possible circular locking dependency detected 5.12.0-rc4-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/11839 is trying to acquire lock: ffffffff8d6704e8 (rtnl_mutex){+.+.}-{3:3}, at: ipv6_sock_mc_close+0xd7/0x120 net/ipv6/mcast.c:357 but task is already holding lock: ffff8880626e1920 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1603 [inline] ffff8880626e1920 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x57/0x130 net/mptcp/protocol.c:3540 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sk_lock-AF_INET6){+.+.}-{0:0}: lock_sock_nested+0xca/0x120 net/core/sock.c:3071 lock_sock include/net/sock.h:1603 [inline] sock_set_reuseaddr+0x13/0x60 net/core/sock.c:716 siw_create_listen+0x1a3/0x1050 drivers/infiniband/sw/siw/siw_cm.c:1775 iw_cm_listen+0x167/0x1f0 drivers/infiniband/core/iwcm.c:584 cma_iw_listen drivers/infiniband/core/cma.c:2482 [inline] rdma_listen+0x6df/0xe00 drivers/infiniband/core/cma.c:3743 cma_listen_on_dev+0x4b7/0x770 drivers/infiniband/core/cma.c:2538 cma_add_one+0x670/0xcf0 drivers/infiniband/core/cma.c:4917 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:717 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1413 [inline] ib_register_device+0x7c7/0xa50 drivers/infiniband/core/device.c:1365 siw_device_register drivers/infiniband/sw/siw/siw_main.c:72 [inline] siw_newlink drivers/infiniband/sw/siw/siw_main.c:521 [inline] siw_newlink+0xc0c/0x1120 drivers/infiniband/sw/siw/siw_main.c:498 nldev_newlink+0x30e/0x560 drivers/infiniband/core/nldev.c:1555 rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #1 (lock#6){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:949 [inline] __mutex_lock+0x139/0x1120 kernel/locking/mutex.c:1096 cma_init+0x20/0x128 drivers/infiniband/core/cma.c:4998 do_one_initcall+0x103/0x650 init/main.c:1226 do_initcall_level init/main.c:1299 [inline] do_initcalls init/main.c:1315 [inline] do_basic_setup init/main.c:1335 [inline] kernel_init_freeable+0x63e/0x6c2 init/main.c:1537 kernel_init+0xd/0x1b8 init/main.c:1424 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 -> #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+0x2b14/0x54c0 kernel/locking/lockdep.c:4900 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x740 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+0xd7/0x120 net/ipv6/mcast.c:357 mptcp6_release+0xb9/0x130 net/mptcp/protocol.c:3548 __sock_release+0xcd/0x280 net/socket.c:599 sock_close+0x18/0x20 net/socket.c:1258 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:140 get_signal+0x1c89/0x2100 kernel/signal.c:2558 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x148/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: rtnl_mutex --> lock#6 --> sk_lock-AF_INET6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET6); lock(lock#6); lock(sk_lock-AF_INET6); lock(rtnl_mutex); *** DEADLOCK *** 2 locks held by syz-executor.3/11839: #0: ffff88823bd0ed50 (&sb->s_type->i_mutex_key#13){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:775 [inline] #0: ffff88823bd0ed50 (&sb->s_type->i_mutex_key#13){+.+.}-{3:3}, at: __sock_release+0x86/0x280 net/socket.c:598 #1: ffff8880626e1920 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1603 [inline] #1: ffff8880626e1920 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x57/0x130 net/mptcp/protocol.c:3540 stack backtrace: CPU: 1 PID: 11839 Comm: syz-executor.3 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+0x141/0x1d7 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+0x2b14/0x54c0 kernel/locking/lockdep.c:4900 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x740 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+0xd7/0x120 net/ipv6/mcast.c:357 mptcp6_release+0xb9/0x130 net/mptcp/protocol.c:3548 __sock_release+0xcd/0x280 net/socket.c:599 sock_close+0x18/0x20 net/socket.c:1258 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:140 get_signal+0x1c89/0x2100 kernel/signal.c:2558 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x148/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466459 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:00007f3822ea9188 EFLAGS: 00000246 ORIG_RAX: 000000000000002d RAX: 0000000000001fb3 RBX: 000000000056bf60 RCX: 0000000000466459 RDX: ffffffffffffff21 RSI: 0000000020000480 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: fffffffffffffe8c R10: 0000000000000734 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffdb4deaa8f R14: 00007f3822ea9300 R15: 0000000000022000