====================================================== WARNING: possible circular locking dependency detected 5.2.0-rc3+ #1 Not tainted ------------------------------------------------------ syz-executor.1/7519 is trying to acquire lock: 000000006e793160 (rtnl_mutex){+.+.}, at: rtnl_lock+0x12/0x20 net/core/rtnetlink.c:72 but task is already holding lock: 000000000d55e293 (&xs->mutex){+.+.}, at: xsk_bind+0x122/0x1180 net/xdp/xsk.c:422 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&xs->mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf5/0x1210 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x100/0x240 net/xdp/xsk.c:730 notifier_call_chain+0x8a/0x160 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:403 call_netdevice_notifiers_info+0x28/0x60 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+0x78e/0xce0 net/core/dev.c:8206 rollback_registered+0xdc/0x190 net/core/dev.c:8248 unregister_netdevice_queue+0x186/0x240 net/core/dev.c:9295 br_dev_delete+0x127/0x190 net/bridge/br_if.c:383 br_del_bridge+0x9a/0xe0 net/bridge/br_if.c:483 br_ioctl_deviceless_stub+0x21f/0x640 net/bridge/br_ioctl.c:376 sock_ioctl+0x367/0x600 net/socket.c:1141 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x196/0x10c0 fs/ioctl.c:696 ksys_ioctl+0x62/0x90 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:718 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (&net->xdp.lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf5/0x1210 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x72/0x240 net/xdp/xsk.c:726 notifier_call_chain+0x8a/0x160 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x11/0x20 kernel/notifier.c:403 call_netdevice_notifiers_info+0x28/0x60 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+0x78e/0xce0 net/core/dev.c:8206 unregister_netdevice_many+0x3e/0x1f0 net/core/dev.c:9314 ip6gre_exit_batch_net+0x3ad/0x5b0 net/ipv6/ip6_gre.c:1603 ops_exit_list.isra.5+0xd3/0x120 net/core/net_namespace.c:157 cleanup_net+0x363/0x850 net/core/net_namespace.c:553 process_one_work+0x830/0x16a0 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x324/0x3e0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> #0 (rtnl_mutex){+.+.}: lock_acquire+0x173/0x3d0 kernel/locking/lockdep.c:4303 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf5/0x1210 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 rtnl_lock+0x12/0x20 net/core/rtnetlink.c:72 xdp_umem_assign_dev+0xa5/0xb20 net/xdp/xdp_umem.c:96 xsk_bind+0x49c/0x1180 net/xdp/xsk.c:488 __sys_bind+0x1e1/0x230 net/socket.c:1653 __do_sys_bind net/socket.c:1664 [inline] __se_sys_bind net/socket.c:1662 [inline] __x64_sys_bind+0x6e/0xb0 net/socket.c:1662 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: rtnl_mutex --> &net->xdp.lock --> &xs->mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&xs->mutex); lock(&net->xdp.lock); lock(&xs->mutex); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor.1/7519: #0: 000000000d55e293 (&xs->mutex){+.+.}, at: xsk_bind+0x122/0x1180 net/xdp/xsk.c:422 stack backtrace: CPU: 1 PID: 7519 Comm: syz-executor.1 Not tainted 5.2.0-rc3+ #1 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+0x113/0x167 lib/dump_stack.c:113 print_circular_bug.cold.59+0x1bd/0x27d kernel/locking/lockdep.c:1565 check_prev_add kernel/locking/lockdep.c:2310 [inline] check_prevs_add kernel/locking/lockdep.c:2418 [inline] validate_chain kernel/locking/lockdep.c:2800 [inline] __lock_acquire+0x3853/0x55b0 kernel/locking/lockdep.c:3793 lock_acquire+0x173/0x3d0 kernel/locking/lockdep.c:4303 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf5/0x1210 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 rtnl_lock+0x12/0x20 net/core/rtnetlink.c:72 xdp_umem_assign_dev+0xa5/0xb20 net/xdp/xdp_umem.c:96 xsk_bind+0x49c/0x1180 net/xdp/xsk.c:488 __sys_bind+0x1e1/0x230 net/socket.c:1653 __do_sys_bind net/socket.c:1664 [inline] __se_sys_bind net/socket.c:1662 [inline] __x64_sys_bind+0x6e/0xb0 net/socket.c:1662 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4597c9 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:00007ff555fe0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004597c9 RDX: 0000000000000010 RSI: 0000000020000300 RDI: 0000000000000005 RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff555fe16d4 R13: 00000000004bfa03 R14: 00000000004d1370 R15: 00000000ffffffff