bridge_slave_0: left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
dvmrp0: left allmulticast mode
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
kworker/u8:2/5648 is trying to acquire lock:
ffff888116176ed0 (&net->xdp.lock){+.+.}-{4:4}, at: xsk_notifier+0x89/0x230

but task is already holding lock:
ffff88811447e8c0 (&port->pnodes_lock){+.+.}-{4:4}, at: ipvlan_device_event+0x489/0xfb0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&port->pnodes_lock){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       ipvlan_device_event+0x489/0xfb0
       notifier_call_chain+0x1a5/0x3d0
       netif_state_change+0x27d/0x3a0
       do_setlink+0x3c57/0x4670
       rtnl_newlink+0x146f/0x1c30
       rtnetlink_rcv_msg+0x802/0xc00
       netlink_rcv_skb+0x226/0x4a0
       netlink_unicast+0x7bd/0x940
       netlink_sendmsg+0x813/0xb40
       sock_sendmsg_nosec+0x13a/0x180
       ____sys_sendmsg+0x54e/0x850
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1b1/0x290
       do_syscall_64+0x166/0x520
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&dev_instance_lock_key#3){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       xsk_bind+0x331/0x1380
       __sys_bind+0x2e3/0x410
       __x64_sys_bind+0x7a/0x90
       do_syscall_64+0x166/0x520
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&xs->mutex){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       xsk_diag_dump+0x52f/0x1560
       netlink_dump+0x711/0xee0
       __netlink_dump_start+0x589/0x7b0
       xsk_diag_handler_dump+0x1a0/0x250
       sock_diag_rcv_msg+0x4b0/0x5f0
       netlink_rcv_skb+0x226/0x4a0
       netlink_unicast+0x7bd/0x940
       netlink_sendmsg+0x813/0xb40
       sock_sendmsg_nosec+0x13a/0x180
       ____sys_sendmsg+0x54e/0x850
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1b1/0x290
       do_syscall_64+0x166/0x520
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&net->xdp.lock){+.+.}-{4:4}:
       __lock_acquire+0x1520/0x2cf0
       lock_acquire+0x106/0x350
       __mutex_lock+0x19d/0x1550
       xsk_notifier+0x89/0x230
       notifier_call_chain+0x1a5/0x3d0
       unregister_netdevice_many_notify+0x17f9/0x2140
       ipvlan_device_event+0xf1f/0xfb0
       notifier_call_chain+0x1a5/0x3d0
       unregister_netdevice_many_notify+0x17f9/0x2140
       ops_undo_list+0x391/0x8d0
       cleanup_net+0x572/0x810
       process_scheduled_works+0xc3d/0x1630
       worker_thread+0xa47/0xfb0
       kthread+0x38b/0x480
       ret_from_fork+0x514/0xb70
       ret_from_fork_asm+0x1a/0x30

other info that might help us debug this:

Chain exists of:
  &net->xdp.lock --> &dev_instance_lock_key#3 --> &port->pnodes_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&port->pnodes_lock);
                               lock(&dev_instance_lock_key#3);
                               lock(&port->pnodes_lock);
  lock(&net->xdp.lock);

 *** DEADLOCK ***

locks held by kworker/u8:2/5648: 5, last CPU#0:
 #0: ffff8881012d5940 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc90004e3fc40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffffffff9023eda8 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810
 #3: ffffffff9024d600 (rtnl_mutex){+.+.}-{4:4}, at: ops_undo_list+0x28e/0x8d0
 #4: ffff88811447e8c0 (&port->pnodes_lock){+.+.}-{4:4}, at: ipvlan_device_event+0x489/0xfb0

stack backtrace:
CPU: 0 UID: 0 PID: 5648 Comm: kworker/u8:2 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e1/0x300
 check_noncircular+0x12e/0x150
 __lock_acquire+0x1520/0x2cf0
 lock_acquire+0x106/0x350
 __mutex_lock+0x19d/0x1550
 xsk_notifier+0x89/0x230
 notifier_call_chain+0x1a5/0x3d0
 unregister_netdevice_many_notify+0x17f9/0x2140
 ipvlan_device_event+0xf1f/0xfb0
 notifier_call_chain+0x1a5/0x3d0
 unregister_netdevice_many_notify+0x17f9/0x2140
 ops_undo_list+0x391/0x8d0
 cleanup_net+0x572/0x810
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond_slave_0: left promiscuous mode
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond_slave_1: left promiscuous mode
bond0 (unregistering): Released all slaves
tipc: Disabling bearer <udp:syz2>
tipc: Left network mode
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
veth1_macvtap: left promiscuous mode
veth0_macvtap: left promiscuous mode
veth1_vlan: left promiscuous mode
veth0_vlan: left promiscuous mode
team_slave_1 (unregistering): left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team_slave_0 (unregistering): left promiscuous mode
team0 (unregistering): Port device team_slave_0 removed
netdevsim netdevsim0 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
