====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/u8:9/1020 is trying to acquire lock: ffff888032b40e70 (&dev_instance_lock_key#23){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2861 [inline] ffff888032b40e70 (&dev_instance_lock_key#23){+.+.}-{4:4}, at: ipvlan_uninit+0x147/0x290 drivers/net/ipvlan/ipvlan_main.c:228 but task is already holding lock: ffff888020fbe8c0 (&port->pnodes_lock){+.+.}-{4:4}, at: ipvlan_device_event+0x489/0xfb0 drivers/net/ipvlan/ipvlan_main.c:810 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&port->pnodes_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 ipvlan_device_event+0x489/0xfb0 drivers/net/ipvlan/ipvlan_main.c:810 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2313 [inline] call_netdevice_notifiers net/core/dev.c:2327 [inline] __dev_close_many+0x119/0x6e0 net/core/dev.c:1769 netif_close_many+0x249/0x660 net/core/dev.c:1824 netif_close_many_and_unlock net/core/dev.c:12407 [inline] unregister_netdevice_many_notify+0x843/0x2140 net/core/dev.c:12477 unregister_netdevice_many net/core/dev.c:12585 [inline] unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12386 unregister_netdevice include/linux/netdevice.h:3487 [inline] nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196 __nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1472 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1486 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1710 nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:963 devlink_reload+0x1c5/0x890 net/devlink/dev.c:462 devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578 ops_pre_exit_list net/core/net_namespace.c:161 [inline] ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235 cleanup_net+0x572/0x810 net/core/net_namespace.c:706 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 (&dev_instance_lock_key#23){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 netdev_lock include/linux/netdevice.h:2861 [inline] ipvlan_uninit+0x147/0x290 drivers/net/ipvlan/ipvlan_main.c:228 unregister_netdevice_many_notify+0x1acd/0x2140 net/core/dev.c:12533 ipvlan_device_event+0xf1f/0xfb0 drivers/net/ipvlan/ipvlan_main.c:851 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2313 [inline] call_netdevice_notifiers net/core/dev.c:2327 [inline] unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12514 unregister_netdevice_many net/core/dev.c:12585 [inline] unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12386 unregister_netdevice include/linux/netdevice.h:3487 [inline] nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196 __nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1472 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1486 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1710 nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:963 devlink_reload+0x1c5/0x890 net/devlink/dev.c:462 devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578 ops_pre_exit_list net/core/net_namespace.c:161 [inline] ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235 cleanup_net+0x572/0x810 net/core/net_namespace.c:706 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port->pnodes_lock); lock(&dev_instance_lock_key#23); lock(&port->pnodes_lock); lock(&dev_instance_lock_key#23); *** DEADLOCK *** 7 locks held by kworker/u8:9/1020: #0: ffff88801c296140 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline] #0: ffff88801c296140 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405 #1: ffffc90004e7fc40 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3297 [inline] #1: ffffc90004e7fc40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0xa20/0x14e0 kernel/workqueue.c:3405 #2: ffffffff9001a868 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810 net/core/net_namespace.c:677 #3: ffff88807925e128 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline] #3: ffff88807925e128 (&dev->mutex){....}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:124 [inline] #3: ffff88807925e128 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x129/0x420 net/devlink/core.c:575 #4: ffff88807925d258 (&devlink->lock_key#2){+.+.}-{4:4}, at: devl_lock net/devlink/core.c:308 [inline] #4: ffff88807925d258 (&devlink->lock_key#2){+.+.}-{4:4}, at: devl_dev_lock net/devlink/devl_internal.h:125 [inline] #4: ffff88807925d258 (&devlink->lock_key#2){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x142/0x420 net/devlink/core.c:575 #5: ffffffff900290c0 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x173/0x800 drivers/net/netdevsim/netdev.c:1191 #6: ffff888020fbe8c0 (&port->pnodes_lock){+.+.}-{4:4}, at: ipvlan_device_event+0x489/0xfb0 drivers/net/ipvlan/ipvlan_main.c:810 stack backtrace: CPU: 0 UID: 0 PID: 1020 Comm: kworker/u8:9 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821 netdev_lock include/linux/netdevice.h:2861 [inline] ipvlan_uninit+0x147/0x290 drivers/net/ipvlan/ipvlan_main.c:228 unregister_netdevice_many_notify+0x1acd/0x2140 net/core/dev.c:12533 ipvlan_device_event+0xf1f/0xfb0 drivers/net/ipvlan/ipvlan_main.c:851 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2313 [inline] call_netdevice_notifiers net/core/dev.c:2327 [inline] unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12514 unregister_netdevice_many net/core/dev.c:12585 [inline] unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12386 unregister_netdevice include/linux/netdevice.h:3487 [inline] nsim_destroy+0x275/0x800 drivers/net/netdevsim/netdev.c:1196 __nsim_dev_port_del+0x14e/0x200 drivers/net/netdevsim/dev.c:1472 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1486 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1710 nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:963 devlink_reload+0x1c5/0x890 net/devlink/dev.c:462 devlink_pernet_pre_exit+0x1ff/0x420 net/devlink/core.c:578 ops_pre_exit_list net/core/net_namespace.c:161 [inline] ops_undo_list+0x17d/0x8d0 net/core/net_namespace.c:235 cleanup_net+0x572/0x810 net/core/net_namespace.c:706 process_one_work kernel/workqueue.c:3322 [inline] process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 netdevsim netdevsim0 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 bridge_slave_1: left allmulticast mode bridge_slave_1: left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state bridge_slave_0: left allmulticast mode bridge_slave_0: left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond_slave_0: left allmulticast mode bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond_slave_1: left allmulticast mode bond0 (unregistering): Released all slaves hsr_slave_0: left promiscuous mode hsr_slave_1: left promiscuous mode batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 batman_adv: batadv0: Removing interface: batadv_slave_1 veth1_macvtap: left allmulticast mode veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left allmulticast mode veth1_vlan: left promiscuous mode veth0_vlan: left promiscuous mode team_slave_1 (unregistering): left allmulticast mode team0 (unregistering): Port device team_slave_1 removed team_slave_0 (unregistering): left allmulticast mode team0 (unregistering): Port device team_slave_0 removed bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered forwarding state bridge0: port 2(bridge_slave_1) entered blocking state bridge0: port 2(bridge_slave_1) entered forwarding state netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50