dummy0: left allmulticast mode
bridge0: port 2(vlan2) entered disabled state
team0: Port device bridge0 removed
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
kworker/u8:1/32041 is trying to acquire lock:
ffff8881bdb98e70 (&dev_instance_lock_key#2){+.+.}-{4:4}, at: ipvlan_uninit+0x147/0x290

but task is already holding lock:
ffff8881187888c0 (&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:

-> #1 (&port->pnodes_lock){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       ipvlan_device_event+0x489/0xfb0
       notifier_call_chain+0x1a5/0x3d0
       call_netdevice_notifiers+0x90/0xd0
       xdp_set_features_flag+0x1a0/0x2a0
       bond_xdp_set_features+0x25d/0x320
       __bond_release_one+0xeb3/0x11c0
       bond_netdev_event+0x54a/0xf80
       notifier_call_chain+0x1a5/0x3d0
       unregister_netdevice_many_notify+0x17f9/0x2140
       unregister_netdevice_queue+0x2f5/0x340
       nsim_destroy+0x275/0x800
       __nsim_dev_port_del+0x14e/0x200
       nsim_dev_reload_destroy+0x288/0x490
       nsim_dev_reload_down+0x8a/0xc0
       devlink_reload+0x1c5/0x890
       devlink_pernet_pre_exit+0x1ff/0x420
       ops_undo_list+0x17d/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

-> #0 (&dev_instance_lock_key#2){+.+.}-{4:4}:
       __lock_acquire+0x15ff/0x2e50
       lock_acquire+0x115/0x350
       __mutex_lock+0x19d/0x1550
       ipvlan_uninit+0x147/0x290
       unregister_netdevice_many_notify+0x1acd/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:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&port->pnodes_lock);
                               lock(&dev_instance_lock_key#2);
                               lock(&port->pnodes_lock);
  lock(&dev_instance_lock_key#2);

 *** DEADLOCK ***

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

stack backtrace:
CPU: 1 UID: 0 PID: 32041 Comm: kworker/u8:1 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+0x2e2/0x300
 check_noncircular+0x12f/0x150
 __lock_acquire+0x15ff/0x2e50
 lock_acquire+0x115/0x350
 __mutex_lock+0x19d/0x1550
 ipvlan_uninit+0x147/0x290
 unregister_netdevice_many_notify+0x1acd/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): Released all slaves
bond1 (unregistering): Released all slaves
bond2 (unregistering): Released all slaves
tipc: Disabling bearer <udp:syz0>
tipc: Disabling bearer <udp:syz2>
tipc: Left network mode
IPVS: stopping backup sync thread 27171 ...
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Removing interface: macsec1
IPVS: stop unused estimator thread 0...
