====================================================== WARNING: possible circular locking dependency detected 5.2.0+ #34 Not tainted ------------------------------------------------------ syz-executor.0/2614 is trying to acquire lock: 00000000fe6a45c8 (&xs->mutex){+.+.}, at: xsk_notifier+0xe7/0x3b0 /net/xdp/xsk.c:764 but task is already holding lock: 00000000005c8843 (&net->xdp.lock){+.+.}, at: xsk_notifier+0x8c/0x3b0 /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+0x17c/0x2850 /kernel/locking/mutex.c:926 __mutex_lock /kernel/locking/mutex.c:1073 [inline] mutex_lock_nested+0x1b/0x30 /kernel/locking/mutex.c:1088 xsk_notifier+0x8c/0x3b0 /net/xdp/xsk.c:760 notifier_call_chain /kernel/notifier.c:95 [inline] __raw_notifier_call_chain /kernel/notifier.c:396 [inline] raw_notifier_call_chain+0xec/0x190 /kernel/notifier.c:403 call_netdevice_notifiers_info /net/core/dev.c:1749 [inline] call_netdevice_notifiers_extack /net/core/dev.c:1761 [inline] call_netdevice_notifiers /net/core/dev.c:1775 [inline] rollback_registered_many+0xd46/0x1410 /net/core/dev.c:8196 rollback_registered /net/core/dev.c:8238 [inline] unregister_netdevice_queue+0x333/0x500 /net/core/dev.c:9285 unregister_netdevice /./include/linux/netdevice.h:2631 [inline] __tun_detach+0x1101/0x1a90 /drivers/net/tun.c:723 tun_detach /drivers/net/tun.c:740 [inline] tun_chr_close+0xf1/0x130 /drivers/net/tun.c:3439 __fput+0x2e4/0x740 /fs/file_table.c:280 ____fput+0x15/0x20 /fs/file_table.c:313 task_work_run+0x17e/0x1b0 /kernel/task_work.c:113 tracehook_notify_resume /./include/linux/tracehook.h:188 [inline] exit_to_usermode_loop /arch/x86/entry/common.c:163 [inline] prepare_exit_to_usermode+0x459/0x580 /arch/x86/entry/common.c:194 syscall_return_slowpath+0x113/0x4a0 /arch/x86/entry/common.c:274 do_syscall_64+0x126/0x140 /arch/x86/entry/common.c:299 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common+0x17c/0x2850 /kernel/locking/mutex.c:926 __mutex_lock /kernel/locking/mutex.c:1073 [inline] mutex_lock_nested+0x1b/0x30 /kernel/locking/mutex.c:1088 rtnl_lock+0x17/0x20 /net/core/rtnetlink.c:72 xdp_umem_assign_dev+0xce/0x850 /net/xdp/xdp_umem.c:96 xsk_bind+0x4ab/0xca0 /net/xdp/xsk.c:502 __sys_bind+0x305/0x400 /net/socket.c:1643 __do_sys_bind /net/socket.c:1654 [inline] __se_sys_bind /net/socket.c:1652 [inline] __x64_sys_bind+0x7a/0x90 /net/socket.c:1652 do_syscall_64+0xfe/0x140 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&xs->mutex){+.+.}: validate_chain /kernel/locking/lockdep.c:2897 [inline] __lock_acquire+0x2531/0x4750 /kernel/locking/lockdep.c:3880 lock_acquire+0x158/0x250 /kernel/locking/lockdep.c:4413 __mutex_lock_common+0x17c/0x2850 /kernel/locking/mutex.c:926 __mutex_lock /kernel/locking/mutex.c:1073 [inline] mutex_lock_nested+0x1b/0x30 /kernel/locking/mutex.c:1088 xsk_notifier+0xe7/0x3b0 /net/xdp/xsk.c:764 notifier_call_chain /kernel/notifier.c:95 [inline] __raw_notifier_call_chain /kernel/notifier.c:396 [inline] raw_notifier_call_chain+0xec/0x190 /kernel/notifier.c:403 call_netdevice_notifiers_info /net/core/dev.c:1749 [inline] call_netdevice_notifiers_extack /net/core/dev.c:1761 [inline] call_netdevice_notifiers /net/core/dev.c:1775 [inline] rollback_registered_many+0xd46/0x1410 /net/core/dev.c:8196 rollback_registered /net/core/dev.c:8238 [inline] unregister_netdevice_queue+0x333/0x500 /net/core/dev.c:9285 br_dev_delete+0x10d/0x120 /net/bridge/br_if.c:383 br_del_bridge+0xb8/0x110 /net/bridge/br_if.c:483 br_ioctl_deviceless_stub+0x251/0x7d0 /net/bridge/br_ioctl.c:376 sock_ioctl+0x2ff/0x730 /net/socket.c:1132 do_vfs_ioctl+0x7d4/0x1890 /fs/ioctl.c:46 ksys_ioctl /fs/ioctl.c:713 [inline] __do_sys_ioctl /fs/ioctl.c:720 [inline] __se_sys_ioctl /fs/ioctl.c:718 [inline] __x64_sys_ioctl+0xe3/0x120 /fs/ioctl.c:718 do_syscall_64+0xfe/0x140 /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 *** 3 locks held by syz-executor.0/2614: #0: 00000000382eb82f (br_ioctl_mutex){+.+.}, at: sock_ioctl+0x2df/0x730 /net/socket.c:1130 #1: 000000003af9b784 (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 /net/core/rtnetlink.c:72 #2: 00000000005c8843 (&net->xdp.lock){+.+.}, at: xsk_notifier+0x8c/0x3b0 /net/xdp/xsk.c:760 stack backtrace: CPU: 1 PID: 2614 Comm: syz-executor.0 Not tainted 5.2.0+ #34 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+0x1d8/0x2f8 /lib/dump_stack.c:113 print_circular_bug+0xd64/0xf50 /kernel/locking/lockdep.c:1616 check_noncircular+0x30d/0x560 /kernel/locking/lockdep.c:1741 check_prev_add /kernel/locking/lockdep.c:2405 [inline] check_prevs_add+0x560/0x5950 /kernel/locking/lockdep.c:2507 validate_chain /kernel/locking/lockdep.c:2897 [inline] __lock_acquire+0x2531/0x4750 /kernel/locking/lockdep.c:3880 lock_acquire+0x158/0x250 /kernel/locking/lockdep.c:4413 __mutex_lock_common+0x17c/0x2850 /kernel/locking/mutex.c:926 __mutex_lock /kernel/locking/mutex.c:1073 [inline] mutex_lock_nested+0x1b/0x30 /kernel/locking/mutex.c:1088 xsk_notifier+0xe7/0x3b0 /net/xdp/xsk.c:764 notifier_call_chain /kernel/notifier.c:95 [inline] __raw_notifier_call_chain /kernel/notifier.c:396 [inline] raw_notifier_call_chain+0xec/0x190 /kernel/notifier.c:403 call_netdevice_notifiers_info /net/core/dev.c:1749 [inline] call_netdevice_notifiers_extack /net/core/dev.c:1761 [inline] call_netdevice_notifiers /net/core/dev.c:1775 [inline] rollback_registered_many+0xd46/0x1410 /net/core/dev.c:8196 rollback_registered /net/core/dev.c:8238 [inline] unregister_netdevice_queue+0x333/0x500 /net/core/dev.c:9285 br_dev_delete+0x10d/0x120 /net/bridge/br_if.c:383 br_del_bridge+0xb8/0x110 /net/bridge/br_if.c:483 br_ioctl_deviceless_stub+0x251/0x7d0 /net/bridge/br_ioctl.c:376 sock_ioctl+0x2ff/0x730 /net/socket.c:1132 do_vfs_ioctl+0x7d4/0x1890 /fs/ioctl.c:46 ksys_ioctl /fs/ioctl.c:713 [inline] __do_sys_ioctl /fs/ioctl.c:720 [inline] __se_sys_ioctl /fs/ioctl.c:718 [inline] __x64_sys_ioctl+0xe3/0x120 /fs/ioctl.c:718 do_syscall_64+0xfe/0x140 /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:00007f71ddbf1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 0000000020001580 RSI: 00000000000089a1 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f71ddbf26d4 R13: 00000000004cd168 R14: 00000000004d66b8 R15: 00000000ffffffff kobject: 'batman_adv' (000000009e7e3214): kobject_uevent_env kobject: 'batman_adv' (000000009e7e3214): kobject_uevent_env: filter function caused the event to drop! kobject: 'batman_adv' (000000009e7e3214): kobject_cleanup, parent 0000000092db8e43 kobject: 'batman_adv' (000000009e7e3214): calling ktype release kobject: (000000009e7e3214): dynamic_kobj_release kobject: 'batman_adv': free name kobject: 'rx-0' (00000000f96ef8a3): kobject_cleanup, parent 000000004dd45d8f kobject: 'rx-0' (00000000f96ef8a3): auto cleanup 'remove' event kobject: 'rx-0' (00000000f96ef8a3): kobject_uevent_env kobject: 'rx-0' (00000000f96ef8a3): fill_kobj_path: path = '/devices/virtual/net/&@[/queues/rx-0' kobject: 'rx-0' (00000000f96ef8a3): auto cleanup kobject_del kobject: 'rx-0' (00000000f96ef8a3): calling ktype release kobject: 'rx-0': free name kobject: 'tx-0' (0000000028e48bd0): kobject_cleanup, parent 000000004dd45d8f kobject: 'tx-0' (0000000028e48bd0): auto cleanup 'remove' event kobject: 'tx-0' (0000000028e48bd0): kobject_uevent_env kobject: 'tx-0' (0000000028e48bd0): fill_kobj_path: path = '/devices/virtual/net/&@[/queues/tx-0' kobject: 'tx-0' (0000000028e48bd0): auto cleanup kobject_del kobject: 'tx-0' (0000000028e48bd0): calling ktype release kobject: 'tx-0': free name kobject: 'queues' (000000004dd45d8f): kobject_cleanup, parent 0000000092db8e43 kobject: 'queues' (000000004dd45d8f): calling ktype release kobject: 'queues' (000000004dd45d8f): kset_release kobject: 'queues': free name kobject: '&@[' (00000000c32435c9): kobject_uevent_env kobject: '&@[' (00000000c32435c9): fill_kobj_path: path = '/devices/virtual/net/&@[' kobject: '&@[' (00000000c32435c9): kobject_cleanup, parent 0000000092db8e43 kobject: '&@[' (00000000c32435c9): calling ktype release kobject: '&@[': free name