WARNING: possible circular locking dependency detected 5.6.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/24037 is trying to acquire lock: ffffffff893580a8 (lock#3){+.+.}-{3:3}, at: cma_netdev_callback+0xf9/0x5a0 drivers/infiniband/core/cma.c:4612 but task is already holding lock: ffffffff893a6618 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] ffffffff893a6618 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x83c/0xd40 net/core/rtnetlink.c:5433 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}-{3:3}: lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4923 __mutex_lock_common+0x189/0x2fc0 kernel/locking/mutex.c:956 __mutex_lock kernel/locking/mutex.c:1103 [inline] mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1118 siw_create_listen+0x3ad/0xd60 drivers/infiniband/sw/siw/siw_cm.c:1977 iw_cm_listen+0x154/0x220 drivers/infiniband/core/iwcm.c:584 cma_iw_listen drivers/infiniband/core/cma.c:2450 [inline] rdma_listen+0x682/0x980 drivers/infiniband/core/cma.c:3621 cma_listen_on_dev+0x65f/0x8d0 drivers/infiniband/core/cma.c:2501 cma_add_one+0x61f/0x720 drivers/infiniband/core/cma.c:4673 add_client_context+0x469/0x660 drivers/infiniband/core/device.c:681 enable_device_and_get+0x15b/0x370 drivers/infiniband/core/device.c:1318 ib_register_device+0x125d/0x15c0 drivers/infiniband/core/device.c:1384 siw_device_register drivers/infiniband/sw/siw/siw_main.c:70 [inline] siw_newlink+0xa81/0xf60 drivers/infiniband/sw/siw/siw_main.c:565 nldev_newlink+0x425/0x4a0 drivers/infiniband/core/nldev.c:1542 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+0x66a/0x990 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x2a6/0x360 net/socket.c:2449 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 -> #0 (lock#3){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2515 [inline] check_prevs_add kernel/locking/lockdep.c:2620 [inline] validate_chain+0x1b09/0x8920 kernel/locking/lockdep.c:3237 __lock_acquire+0x116c/0x2b90 kernel/locking/lockdep.c:4344 lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4923 __mutex_lock_common+0x189/0x2fc0 kernel/locking/mutex.c:956 __mutex_lock kernel/locking/mutex.c:1103 [inline] mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1118 cma_netdev_callback+0xf9/0x5a0 drivers/infiniband/core/cma.c:4612 notifier_call_chain kernel/notifier.c:83 [inline] __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0xd4/0x170 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_extack net/core/dev.c:1960 [inline] call_netdevice_notifiers+0xeb/0x150 net/core/dev.c:1974 bond_change_active_slave+0x1f7f/0x2b20 drivers/net/bonding/bond_main.c:947 bond_select_active_slave+0x564/0x960 drivers/net/bonding/bond_main.c:986 bond_enslave+0x3c94/0x5220 drivers/net/bonding/bond_main.c:1823 do_set_master net/core/rtnetlink.c:2468 [inline] __rtnl_newlink net/core/rtnetlink.c:3346 [inline] rtnl_newlink+0x182f/0x1c00 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5436 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x2a6/0x360 net/socket.c:2449 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 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-executor.3/24037: #0: ffffffff893a6618 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: ffffffff893a6618 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x83c/0xd40 net/core/rtnetlink.c:5433 stack backtrace: CPU: 1 PID: 24037 Comm: syz-executor.3 Not tainted 5.6.0-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+0x1e9/0x30e lib/dump_stack.c:118 print_circular_bug+0xc72/0xea0 kernel/locking/lockdep.c:1722 check_noncircular+0x1fb/0x3a0 kernel/locking/lockdep.c:1846 check_prev_add kernel/locking/lockdep.c:2515 [inline] check_prevs_add kernel/locking/lockdep.c:2620 [inline] validate_chain+0x1b09/0x8920 kernel/locking/lockdep.c:3237 __lock_acquire+0x116c/0x2b90 kernel/locking/lockdep.c:4344 lock_acquire+0x169/0x480 kernel/locking/lockdep.c:4923 __mutex_lock_common+0x189/0x2fc0 kernel/locking/mutex.c:956 __mutex_lock kernel/locking/mutex.c:1103 [inline] mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1118 cma_netdev_callback+0xf9/0x5a0 drivers/infiniband/core/cma.c:4612 notifier_call_chain kernel/notifier.c:83 [inline] __raw_notifier_call_chain kernel/notifier.c:361 [inline] raw_notifier_call_chain+0xd4/0x170 kernel/notifier.c:368 call_netdevice_notifiers_info net/core/dev.c:1948 [inline] call_netdevice_notifiers_extack net/core/dev.c:1960 [inline] call_netdevice_notifiers+0xeb/0x150 net/core/dev.c:1974 bond_change_active_slave+0x1f7f/0x2b20 drivers/net/bonding/bond_main.c:947 bond_select_active_slave+0x564/0x960 drivers/net/bonding/bond_main.c:986 bond_enslave+0x3c94/0x5220 drivers/net/bonding/bond_main.c:1823 do_set_master net/core/rtnetlink.c:2468 [inline] __rtnl_newlink net/core/rtnetlink.c:3346 [inline] rtnl_newlink+0x182f/0x1c00 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5436 netlink_rcv_skb+0x190/0x3a0 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f9/0x7c0 net/socket.c:2362 ___sys_sendmsg net/socket.c:2416 [inline] __sys_sendmsg+0x2a6/0x360 net/socket.c:2449 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c849 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8b00ac1c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f8b00ac26d4 RCX: 000000000045c849 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000004 RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fc R14: 00000000004ccb3c R15: 000000000076bfac bond1: (slave bridge5): Enslaving as an active interface with an up link bond1: (slave bridge6): Enslaving as a backup interface with an up link