pimreg9: left allmulticast mode
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u8:4/15578 is trying to acquire lock:
ffff888166ff1fd0 (&net->xdp.lock){+.+.}-{4:4}, at: xsk_notifier+0x89/0x230

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

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+0x468/0xe60
       notifier_call_chain+0x1a5/0x3d0
       netdev_compute_master_upper_features+0x944/0xb30
       bond_netdev_event+0x7a3/0xf80
       notifier_call_chain+0x1a5/0x3d0
       __netdev_update_features+0xde7/0x1ef0
       netdev_compute_master_upper_features+0x90c/0xb30
       bond_enslave+0x2327/0x3b10
       bond_do_ioctl+0x6f6/0x8e0
       bond_siocdevprivate+0x19c/0x1f0
       dev_ifsioc+0xb56/0x1360
       dev_ioctl+0x84c/0x1150
       sock_ioctl+0x753/0x7e0
       __se_sys_ioctl+0xfc/0x170
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&dev_instance_lock_key#23){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       xsk_bind+0x331/0x1290
       __sys_bind+0x2e3/0x410
       __x64_sys_bind+0x7a/0x90
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&xs->mutex){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       xsk_notifier+0xcd/0x230
       notifier_call_chain+0x1a5/0x3d0
       unregister_netdevice_many_notify+0x17de/0x2150
       rtnl_dellink+0x5be/0x810
       rtnetlink_rcv_msg+0x802/0xc00
       netlink_rcv_skb+0x226/0x4a0
       netlink_unicast+0x7bb/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+0x174/0x580
       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+0x17de/0x2150
       ipvlan_device_event+0xdd4/0xe60
       notifier_call_chain+0x1a5/0x3d0
       unregister_netdevice_many_notify+0x17de/0x2150
       ops_undo_list+0x391/0x8d0
       cleanup_net+0x572/0x810
       process_scheduled_works+0xa8e/0x14e0
       worker_thread+0xa47/0xfb0
       kthread+0x388/0x470
       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#23 --> &port->pnodes_lock

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

5 locks held by kworker/u8:4/15578:
 #0: ffff8881012d5940 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
 #1: ffffc9000363fc40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0
 #2: ffffffff90017048 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810
 #3: ffffffff90025c00 (rtnl_mutex){+.+.}-{4:4}, at: ops_undo_list+0x28e/0x8d0
 #4: ffff8881bca4c8c0 (&port->pnodes_lock){+.+.}-{4:4}, at: ipvlan_device_event+0x468/0xe60

stack backtrace:
CPU: 1 UID: 0 PID: 15578 Comm: kworker/u8:4 Not tainted syzkaller #0 PREEMPT(full) 
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+0x17de/0x2150
 ipvlan_device_event+0xdd4/0xe60
 notifier_call_chain+0x1a5/0x3d0
 unregister_netdevice_many_notify+0x17de/0x2150
 ops_undo_list+0x391/0x8d0
 cleanup_net+0x572/0x810
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>
bond1 (unregistering): Released all slaves
bond2 (unregistering): Released all slaves
bond3 (unregistering): Released all slaves
bond0 (unregistering): Released all slaves
bond4 (unregistering): Released all slaves
bond5 (unregistering): (slave veth7): Releasing active interface
bond5 (unregistering): (slave batadv2): Releasing active interface
bond5 (unregistering): Released all slaves
bond6 (unregistering): Released all slaves
bond7 (unregistering): Released all slaves
bond8 (unregistering): Released all slaves
bond9 (unregistering): (slave veth77): Releasing active interface
bond9 (unregistering): Released all slaves
bond10 (unregistering): Released all slaves
bond11 (unregistering): (slave veth81): Releasing active interface
bond11 (unregistering): Released all slaves
bond12 (unregistering): Released all slaves
bond13 (unregistering): Released all slaves
bond14 (unregistering): Released all slaves
tipc: Disabling bearer <eth:syzkaller0>
tipc: Left network mode
hsr_slave_0: left promiscuous mode
smc: removing net device vlan1 with user defined pnetid SYZ2
IPVS: stop unused estimator thread 0...
