====================================================== WARNING: possible circular locking dependency detected 5.2.0-rc6+ #75 Not tainted ------------------------------------------------------ syz-executor.3/13992 is trying to acquire lock: 000000005d91c609 (&xs->mutex){+.+.}, at: xsk_notifier+0x149/0x290 net/xdp/xsk.c:730 but task is already holding lock: 00000000f84ff173 (&net->xdp.lock){+.+.}, at: xsk_notifier+0xa7/0x290 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+0xf7/0x1310 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0xa7/0x290 net/xdp/xsk.c:726 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+0x9b9/0xfc0 net/core/dev.c:8206 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9314 unregister_netdevice_many+0x3b/0x50 net/core/dev.c:9313 ip6gre_exit_batch_net+0x535/0x750 net/ipv6/ip6_gre.c:1603 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:157 cleanup_net+0x3fb/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 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+0xf7/0x1310 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/0x8b0 net/xdp/xdp_umem.c:96 xsk_bind+0x4d7/0xe70 net/xdp/xsk.c:488 __sys_bind+0x239/0x290 net/socket.c:1653 __do_sys_bind net/socket.c:1664 [inline] __se_sys_bind net/socket.c:1662 [inline] __x64_sys_bind+0x73/0xb0 net/socket.c:1662 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&xs->mutex){+.+.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4303 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1310 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x149/0x290 net/xdp/xsk.c:730 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+0x9b9/0xfc0 net/core/dev.c:8206 rollback_registered+0x109/0x1d0 net/core/dev.c:8248 unregister_netdevice_queue net/core/dev.c:9295 [inline] unregister_netdevice_queue+0x1ee/0x2c0 net/core/dev.c:9288 br_dev_delete+0x145/0x1a0 net/bridge/br_if.c:383 br_del_bridge+0xd7/0x120 net/bridge/br_if.c:483 br_ioctl_deviceless_stub+0x2a4/0x7b0 net/bridge/br_ioctl.c:376 sock_ioctl+0x44b/0x780 net/socket.c:1141 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 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.3/13992: #0: 000000007ca0b21c (br_ioctl_mutex){+.+.}, at: sock_ioctl+0x427/0x780 net/socket.c:1139 #1: 00000000b7167582 (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 #2: 00000000f84ff173 (&net->xdp.lock){+.+.}, at: xsk_notifier+0xa7/0x290 net/xdp/xsk.c:726 stack backtrace: CPU: 0 PID: 13992 Comm: syz-executor.3 Not tainted 5.2.0-rc6+ #75 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+0x1cc/0x28f 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+0x3755/0x5490 kernel/locking/lockdep.c:3793 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4303 __mutex_lock_common kernel/locking/mutex.c:926 [inline] __mutex_lock+0xf7/0x1310 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 xsk_notifier+0x149/0x290 net/xdp/xsk.c:730 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+0x9b9/0xfc0 net/core/dev.c:8206 rollback_registered+0x109/0x1d0 net/core/dev.c:8248 unregister_netdevice_queue net/core/dev.c:9295 [inline] unregister_netdevice_queue+0x1ee/0x2c0 net/core/dev.c:9288 br_dev_delete+0x145/0x1a0 net/bridge/br_if.c:383 br_del_bridge+0xd7/0x120 net/bridge/br_if.c:483 br_ioctl_deviceless_stub+0x2a4/0x7b0 net/bridge/br_ioctl.c:376 sock_ioctl+0x44b/0x780 net/socket.c:1141 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 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:00007f026d7d6c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004597c9 RDX: 0000000020000180 RSI: 00000000000089a1 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f026d7d76d4 R13: 00000000004c50fb R14: 00000000004d9308 R15: 00000000ffffffff kobject: 'batman_adv' (00000000672624c0): kobject_uevent_env kobject: 'batman_adv' (00000000672624c0): kobject_uevent_env: filter function caused the event to drop! kobject: 'batman_adv' (00000000672624c0): kobject_cleanup, parent 0000000064dbf4de kobject: 'batman_adv' (00000000672624c0): calling ktype release kobject: (00000000672624c0): dynamic_kobj_release kobject: 'batman_adv': free name kobject: 'rx-0' (00000000ed93fe64): kobject_cleanup, parent 000000004384fd41 kobject: 'rx-0' (00000000ed93fe64): auto cleanup 'remove' event kobject: 'rx-0' (00000000ed93fe64): kobject_uevent_env kobject: 'rx-0' (00000000ed93fe64): fill_kobj_path: path = '/devices/virtual/net/bcsf0/queues/rx-0' kobject: 'rx-0' (00000000ed93fe64): auto cleanup kobject_del kobject: 'rx-0' (00000000ed93fe64): calling ktype release kobject: 'rx-0': free name kobject: 'tx-0' (000000003ade701d): kobject_cleanup, parent 000000004384fd41 kobject: 'tx-0' (000000003ade701d): auto cleanup 'remove' event kobject: 'tx-0' (000000003ade701d): kobject_uevent_env kobject: 'tx-0' (000000003ade701d): fill_kobj_path: path = '/devices/virtual/net/bcsf0/queues/tx-0' kobject: 'tx-0' (000000003ade701d): auto cleanup kobject_del kobject: 'tx-0' (000000003ade701d): calling ktype release kobject: 'tx-0': free name kobject: 'queues' (000000004384fd41): kobject_cleanup, parent 0000000064dbf4de kobject: 'queues' (000000004384fd41): calling ktype release kobject: 'queues' (000000004384fd41): kset_release kobject: 'queues': free name kobject: 'bcsf0' (000000008865bcde): kobject_uevent_env kobject: 'bcsf0' (000000008865bcde): fill_kobj_path: path = '/devices/virtual/net/bcsf0' kobject: 'bcsf0' (000000008865bcde): kobject_cleanup, parent 0000000064dbf4de kobject: 'bcsf0' (000000008865bcde): calling ktype release kobject: 'bcsf0': free name