====================================================== WARNING: possible circular locking dependency detected 5.2.0-rc3+ #1 Not tainted ------------------------------------------------------ syz-executor.1/7438 is trying to acquire lock: 000000007656fa30 (&xs->mutex){+.+.}, at: xsk_notifier+0x100/0x240 net/xdp/xsk.c:730 but task is already holding lock: 0000000060077bbe (&net->xdp.lock){+.+.}, at: xsk_notifier+0x72/0x240 net/xdp/xsk.c:726 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+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 -> #1 (rtnl_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 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 -> #0 (&xs->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 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 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 *** 3 locks held by syz-executor.1/7438: #0: 00000000dcbf0869 (br_ioctl_mutex){+.+.}, at: sock_ioctl+0x34a/0x600 net/socket.c:1139 #1: 00000000f673a4c0 (rtnl_mutex){+.+.}, at: rtnl_lock+0x12/0x20 net/core/rtnetlink.c:72 #2: 0000000060077bbe (&net->xdp.lock){+.+.}, at: xsk_notifier+0x72/0x240 net/xdp/xsk.c:726 stack backtrace: CPU: 1 PID: 7438 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 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 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:00007fdb66831c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004597c9 RDX: 0000000020000180 RSI: 00000000000089a1 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fdb668326d4 R13: 00000000004c50fb R14: 00000000004d9308 R15: 00000000ffffffff