iwpm_register_pid: Unable to send a nlmsg (client = 2) infiniband syz1: RDMA CMA: cma_listen_on_dev, error -98 netlink: 'syz-executor725': attribute type 1 has an invalid length. bond1: (slave gretap1): making interface the new active one ====================================================== WARNING: possible circular locking dependency detected 5.6.0-rc3-next-20200228-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor725/9460 is trying to acquire lock: ffffffff8a3d5260 (lock#3){+.+.}, at: cma_netdev_callback+0xc5/0x390 drivers/infiniband/core/cma.c:4618 but task is already holding lock: ffffffff8a551680 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] ffffffff8a551680 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3f9/0xad0 net/core/rtnetlink.c:5437 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103 siw_create_listen+0x329/0xed0 drivers/infiniband/sw/siw/siw_cm.c:1951 iw_cm_listen+0x166/0x1e0 drivers/infiniband/core/iwcm.c:582 cma_iw_listen drivers/infiniband/core/cma.c:2455 [inline] rdma_listen+0x5e2/0x910 drivers/infiniband/core/cma.c:3627 cma_listen_on_dev+0x56b/0x6d0 drivers/infiniband/core/cma.c:2506 cma_add_one+0x6aa/0xb60 drivers/infiniband/core/cma.c:4679 add_client_context+0x400/0x560 drivers/infiniband/core/device.c:681 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1316 ib_register_device drivers/infiniband/core/device.c:1382 [inline] ib_register_device+0xa12/0xda0 drivers/infiniband/core/device.c:1343 siw_device_register drivers/infiniband/sw/siw/siw_main.c:70 [inline] siw_newlink drivers/infiniband/sw/siw/siw_main.c:565 [inline] siw_newlink+0xdef/0x1310 drivers/infiniband/sw/siw/siw_main.c:542 nldev_newlink+0x27f/0x400 drivers/infiniband/core/nldev.c:1538 rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline] rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x586/0x900 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6b9/0x7d0 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0xec/0x1b0 net/socket.c:2430 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (lock#3){+.+.}: check_prev_add kernel/locking/lockdep.c:2481 [inline] check_prevs_add kernel/locking/lockdep.c:2586 [inline] validate_chain kernel/locking/lockdep.c:3203 [inline] __lock_acquire+0x24b3/0x5270 kernel/locking/lockdep.c:4190 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4720 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103 cma_netdev_callback+0xc5/0x390 drivers/infiniband/core/cma.c:4618 notifier_call_chain+0xc0/0x230 kernel/notifier.c:83 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1933 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline] call_netdevice_notifiers+0x79/0xa0 net/core/dev.c:1974 bond_change_active_slave+0x80e/0x1d90 drivers/net/bonding/bond_main.c:944 bond_select_active_slave+0x250/0xa60 drivers/net/bonding/bond_main.c:986 bond_enslave+0x4281/0x4800 drivers/net/bonding/bond_main.c:1823 do_set_master net/core/rtnetlink.c:2468 [inline] do_set_master+0x1d7/0x230 net/core/rtnetlink.c:2441 __rtnl_newlink+0x11d4/0x1590 net/core/rtnetlink.c:3346 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5440 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6b9/0x7d0 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0xec/0x1b0 net/socket.c:2430 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(lock#3); lock(rtnl_mutex); lock(lock#3); *** DEADLOCK *** 1 lock held by syz-executor725/9460: #0: ffffffff8a551680 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: ffffffff8a551680 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3f9/0xad0 net/core/rtnetlink.c:5437 stack backtrace: CPU: 1 PID: 9460 Comm: syz-executor725 Not tainted 5.6.0-rc3-next-20200228-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 check_noncircular+0x32e/0x3e0 kernel/locking/lockdep.c:1812 check_prev_add kernel/locking/lockdep.c:2481 [inline] check_prevs_add kernel/locking/lockdep.c:2586 [inline] validate_chain kernel/locking/lockdep.c:3203 [inline] __lock_acquire+0x24b3/0x5270 kernel/locking/lockdep.c:4190 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4720 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103 cma_netdev_callback+0xc5/0x390 drivers/infiniband/core/cma.c:4618 notifier_call_chain+0xc0/0x230 kernel/notifier.c:83 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1933 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline] call_netdevice_notifiers+0x79/0xa0 net/core/dev.c:1974 bond_change_active_slave+0x80e/0x1d90 drivers/net/bonding/bond_main.c:944 bond_select_active_slave+0x250/0xa60 drivers/net/bonding/bond_main.c:986 bond_enslave+0x4281/0x4800 drivers/net/bonding/bond_main.c:1823 do_set_master net/core/rtnetlink.c:2468 [inline] do_set_master+0x1d7/0x230 net/core/rtnetlink.c:2441 __rtnl_newlink+0x11d4/0x1590 net/core/rtnetlink.c:3346 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5440 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2478 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6b9/0x7d0 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0xec/0x1b0 net/socket.c:2430 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x440529 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffdb731edf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440529 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000004 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000401db0 R13: 0000000000401e40 R14: 0000000000000000 R15: 0000000000000000 bond1: (slave gretap1): Enslaving as an a