BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 59, name: kworker/u4:4 preempt_count: 201, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by kworker/u4:4/59: #0: ffff888017c73938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline] #0: ffff888017c73938 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x96f/0x15d0 kernel/workqueue.c:2711 #1: ffffc900015a7d00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline] #1: ffffc900015a7d00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x96f/0x15d0 kernel/workqueue.c:2711 #2: ffffffff8e3b31d0 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x14c/0xbb0 net/core/net_namespace.c:606 #3: ffffffff8e3c0208 (rtnl_mutex){+.+.}-{3:3}, at: default_device_exit_batch+0xf2/0xa80 net/core/dev.c:11619 #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: xfrm_state_delete net/xfrm/xfrm_state.c:784 [inline] #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: xfrm_dev_state_flush+0x418/0x710 net/xfrm/xfrm_state.c:911 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 59 Comm: kworker/u4:4 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 __might_resched+0x4ad/0x630 kernel/sched/core.c:10211 __mutex_lock_common kernel/locking/mutex.c:580 [inline] __mutex_lock+0xb7/0xcc0 kernel/locking/mutex.c:747 bond_ipsec_del_sa+0x4db/0x740 drivers/net/bonding/bond_main.c:560 xfrm_dev_state_delete net/xfrm/xfrm_state.c:707 [inline] __xfrm_state_delete+0x5d0/0xb10 net/xfrm/xfrm_state.c:764 xfrm_state_delete net/xfrm/xfrm_state.c:785 [inline] xfrm_dev_state_flush+0x420/0x710 net/xfrm/xfrm_state.c:911 bond_master_netdev_event drivers/net/bonding/bond_main.c:3925 [inline] bond_netdev_event+0x28a/0xf30 drivers/net/bonding/bond_main.c:4077 notifier_call_chain+0x197/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x100d/0x1900 net/core/dev.c:11099 unregister_netdevice_many net/core/dev.c:11155 [inline] default_device_exit_batch+0x9ee/0xa80 net/core/dev.c:11633 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x795/0xbb0 net/core/net_namespace.c:652 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 ============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G W ----------------------------- kworker/u4:4/59 is trying to lock: ffff888030451520 (&bond->ipsec_lock){+.+.}-{3:3}, at: bond_ipsec_del_sa+0x4db/0x740 drivers/net/bonding/bond_main.c:560 other info that might help us debug this: context-{4:4} 5 locks held by kworker/u4:4/59: #0: ffff888017c73938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline] #0: ffff888017c73938 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x96f/0x15d0 kernel/workqueue.c:2711 #1: ffffc900015a7d00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline] #1: ffffc900015a7d00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x96f/0x15d0 kernel/workqueue.c:2711 #2: ffffffff8e3b31d0 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x14c/0xbb0 net/core/net_namespace.c:606 #3: ffffffff8e3c0208 (rtnl_mutex){+.+.}-{3:3}, at: default_device_exit_batch+0xf2/0xa80 net/core/dev.c:11619 #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: xfrm_state_delete net/xfrm/xfrm_state.c:784 [inline] #4: ffff88805b0b4068 (&x->lock){+.-.}-{2:2}, at: xfrm_dev_state_flush+0x418/0x710 net/xfrm/xfrm_state.c:911 stack backtrace: CPU: 1 PID: 59 Comm: kworker/u4:4 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4751 [inline] check_wait_context kernel/locking/lockdep.c:4821 [inline] __lock_acquire+0x1d19/0x7d40 kernel/locking/lockdep.c:5087 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747 bond_ipsec_del_sa+0x4db/0x740 drivers/net/bonding/bond_main.c:560 xfrm_dev_state_delete net/xfrm/xfrm_state.c:707 [inline] __xfrm_state_delete+0x5d0/0xb10 net/xfrm/xfrm_state.c:764 xfrm_state_delete net/xfrm/xfrm_state.c:785 [inline] xfrm_dev_state_flush+0x420/0x710 net/xfrm/xfrm_state.c:911 bond_master_netdev_event drivers/net/bonding/bond_main.c:3925 [inline] bond_netdev_event+0x28a/0xf30 drivers/net/bonding/bond_main.c:4077 notifier_call_chain+0x197/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x100d/0x1900 net/core/dev.c:11099 unregister_netdevice_many net/core/dev.c:11155 [inline] default_device_exit_batch+0x9ee/0xa80 net/core/dev.c:11633 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x795/0xbb0 net/core/net_namespace.c:652 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 bond0 (unregistering): Released all slaves