====================================================== WARNING: possible circular locking dependency detected 5.2.0-next-20190712 #37 Not tainted ------------------------------------------------------ syz-executor.5/21641 is trying to acquire lock: 00000000bb1c62c2 (&xs->mutex){+.+.}, at: xsk_notifier+0x145/0x2a0 net/xdp/xsk.c:764 but task is already holding lock: 000000006dea4070 (&net->xdp.lock){+.+.}, at: xsk_notifier+0xa3/0x2a0 net/xdp/xsk.c:760 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&net->xdp.lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1340 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0xa3/0x2a0 net/xdp/xsk.c:760 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] rollback_registered_many+0x8d5/0xdf0 net/core/dev.c:8196 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9304 unregister_netdevice_many+0x3b/0x50 net/core/dev.c:9303 rtnl_delete_link+0xda/0x130 net/core/rtnetlink.c:2814 rtnl_dellink+0x35a/0x970 net/core/rtnetlink.c:2869 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x803/0x920 net/socket.c:2311 __sys_sendmsg+0x105/0x1d0 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2363 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1340 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 xdp_umem_assign_dev+0xbe/0x8f0 net/xdp/xdp_umem.c:96 xsk_bind+0x4d7/0xe80 net/xdp/xsk.c:502 __sys_bind+0x239/0x290 net/socket.c:1647 __do_sys_bind net/socket.c:1658 [inline] __se_sys_bind net/socket.c:1656 [inline] __x64_sys_bind+0x73/0xb0 net/socket.c:1656 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&xs->mutex){+.+.}: check_prev_add kernel/locking/lockdep.c:2405 [inline] check_prevs_add kernel/locking/lockdep.c:2507 [inline] validate_chain kernel/locking/lockdep.c:2897 [inline] __lock_acquire+0x25a9/0x4c30 kernel/locking/lockdep.c:3880 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4413 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1340 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x145/0x2a0 net/xdp/xsk.c:764 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] rollback_registered_many+0x8d5/0xdf0 net/core/dev.c:8196 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9304 unregister_netdevice_many+0x3b/0x50 net/core/dev.c:9303 rtnl_delete_link+0xda/0x130 net/core/rtnetlink.c:2814 rtnl_dellink+0x35a/0x970 net/core/rtnetlink.c:2869 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x803/0x920 net/socket.c:2311 __sys_sendmsg+0x105/0x1d0 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2363 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: &xs->mutex --> rtnl_mutex --> &net->xdp.lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&net->xdp.lock); lock(rtnl_mutex); lock(&net->xdp.lock); lock(&xs->mutex); *** DEADLOCK *** 2 locks held by syz-executor.5/21641: #0: 0000000042e891e0 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:72 [inline] #0: 0000000042e891e0 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x40a/0xb00 net/core/rtnetlink.c:5220 #1: 000000006dea4070 (&net->xdp.lock){+.+.}, at: xsk_notifier+0xa3/0x2a0 net/xdp/xsk.c:760 stack backtrace: CPU: 1 PID: 21641 Comm: syz-executor.5 Not tainted 5.2.0-next-20190712 #37 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+0x172/0x1f0 lib/dump_stack.c:113 print_circular_bug.cold+0x163/0x172 kernel/locking/lockdep.c:1617 check_noncircular+0x345/0x3e0 kernel/locking/lockdep.c:1741 check_prev_add kernel/locking/lockdep.c:2405 [inline] check_prevs_add kernel/locking/lockdep.c:2507 [inline] validate_chain kernel/locking/lockdep.c:2897 [inline] __lock_acquire+0x25a9/0x4c30 kernel/locking/lockdep.c:3880 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4413 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1340 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x145/0x2a0 net/xdp/xsk.c:764 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] rollback_registered_many+0x8d5/0xdf0 net/core/dev.c:8196 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9304 unregister_netdevice_many+0x3b/0x50 net/core/dev.c:9303 rtnl_delete_link+0xda/0x130 net/core/rtnetlink.c:2814 rtnl_dellink+0x35a/0x970 net/core/rtnetlink.c:2869 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 ___sys_sendmsg+0x803/0x920 net/socket.c:2311 __sys_sendmsg+0x105/0x1d0 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2363 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459819 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0aa7c9cc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 0000000000000000 RSI: 0000000020000400 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0aa7c9d6d4 R13: 00000000004c6ed6 R14: 00000000004dc2a0 R15: 00000000ffffffff kobject: 'rx-0' (00000000688c09a1): kobject_cleanup, parent 0000000038198865 kobject: 'rx-0' (00000000688c09a1): auto cleanup 'remove' event kobject: 'rx-0' (00000000688c09a1): kobject_uevent_env kobject: 'rx-0' (00000000688c09a1): fill_kobj_path: path = '/devices/virtual/net/nlmon0/queues/rx-0' kobject: 'rx-0' (00000000688c09a1): auto cleanup kobject_del kobject: 'rx-0' (00000000688c09a1): calling ktype release kobject: 'rx-0': free name kobject: 'tx-0' (00000000e71ff094): kobject_cleanup, parent 0000000038198865 kobject: 'tx-0' (00000000e71ff094): auto cleanup 'remove' event kobject: 'tx-0' (00000000e71ff094): kobject_uevent_env kobject: 'tx-0' (00000000e71ff094): fill_kobj_path: path = '/devices/virtual/net/nlmon0/queues/tx-0' kobject: 'tx-0' (00000000e71ff094): auto cleanup kobject_del kobject: 'tx-0' (00000000e71ff094): calling ktype release kobject: 'tx-0': free name kobject: 'queues' (0000000038198865): kobject_cleanup, parent 00000000122ff3d2 kobject: 'queues' (0000000038198865): calling ktype release kobject: 'queues' (0000000038198865): kset_release kobject: 'queues': free name kobject: 'nlmon0' (000000005f63d654): kobject_uevent_env kobject: 'nlmon0' (000000005f63d654): fill_kobj_path: path = '/devices/virtual/net/nlmon0' kobject: 'nlmon0' (000000005f63d654): kobject_cleanup, parent 00000000122ff3d2 kobject: 'nlmon0' (000000005f63d654): calling ktype release kobject: 'nlmon0': free name