BUG: sleeping function called from invalid context at kernel/workqueue.c:4561
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6068, name: kworker/u8:4
preempt_count: 100, expected: 0
RCU nest depth: 1, expected: 0
locks held by kworker/u8:4/6068: 9, last CPU#1:
 #0: ffff8881012d5940 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc900077d7c40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffffffff90246e48 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810
 #3: ffff88816ac31128 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x129/0x420
 #4: ffff88816ac33258 (&devlink->lock_key#41){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x142/0x420
 #5: ffffffff902556c0 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x173/0x800
 #6: ffff88816cadce70 (&dev_instance_lock_key#23){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x5bb/0x2140
 #7: ffffffff8ed5cbe0 (rcu_read_lock){....}-{1:3}, at: atomic_notifier_call_chain+0x26/0x180
 #8: ffffc90000a18cc0 ((&vub300->inactivity_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0
Preemption disabled at:
[<ffffffff8188eefb>] handle_softirqs+0xab/0x860
CPU: 1 UID: 0 PID: 6068 Comm: kworker/u8:4 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:
 <IRQ>
 dump_stack_lvl+0xe8/0x150
 __might_resched+0x36a/0x4c0
 __cancel_work_sync+0x6d/0x110
 mmc_free_host+0x19/0x30
 call_timer_fn+0x18d/0x5f0
 __run_timer_base+0x652/0x8b0
 run_timer_softirq+0xb7/0x170
 handle_softirqs+0x226/0x860
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:queue_work_on+0x162/0x1d0
Code: 00 4d 85 ed 75 16 e8 ad 90 39 00 eb 15 e8 a6 90 39 00 e8 f1 2b 57 0a 4d 85 ed 74 ea e8 97 90 39 00 fb 65 48 8b 05 d6 16 07 12 <48> 3b 44 24 18 75 56 89 d8 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc900077d6fc0 EFLAGS: 00000293
RAX: a1838ad56c892600 RBX: ffff888168106f01 RCX: ffff88816a638000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000008 R08: ffffffff907a5c7f R09: 1ffffffff20f4b8f
R10: dffffc0000000000 R11: fffffbfff20f4b90 R12: 0000000000000000
R13: 0000000000000200 R14: 0000000000000000 R15: 001fffffffc00001
 inet6addr_event+0x9f/0xd0
 notifier_call_chain+0x1a5/0x3d0
 atomic_notifier_call_chain+0xda/0x180
 addrconf_ifdown+0xe87/0x1a30
 addrconf_notify+0x1bc/0x1050
 notifier_call_chain+0x1a5/0x3d0
 netif_close_many+0x463/0x660
 unregister_netdevice_many_notify+0x843/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
 </TASK>

=============================
WARNING: suspicious RCU usage
syzkaller #0 Tainted: G        W    L     
-----------------------------
kernel/rcu/srcutree.c:1468 Illegal synchronize_srcu() in same-type SRCU (or in RCU) read-side critical section!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 1
locks held by kworker/u8:4/6068: 9, last CPU#1:
 #0: ffff8881012d5940 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc900077d7c40 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffffffff90246e48 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf5/0x810
 #3: ffff88816ac31128 (&dev->mutex){....}-{4:4}, at: devlink_pernet_pre_exit+0x129/0x420
 #4: ffff88816ac33258 (&devlink->lock_key#41){+.+.}-{4:4}, at: devlink_pernet_pre_exit+0x142/0x420
 #5: ffffffff902556c0 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x173/0x800
 #6: ffff88816cadce70 (&dev_instance_lock_key#23){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x5bb/0x2140
 #7: ffffffff8ed5cbe0 (rcu_read_lock){....}-{1:3}, at: atomic_notifier_call_chain+0x26/0x180
 #8: ffffc90000a18cc0 ((&vub300->inactivity_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0

stack backtrace:
CPU: 1 UID: 0 PID: 6068 Comm: kworker/u8:4 Tainted: G        W    L      syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN, [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:
 <IRQ>
 dump_stack_lvl+0xe8/0x150
 lockdep_rcu_suspicious+0x140/0x1d0
 __synchronize_srcu+0x157/0x2f0
 wakeup_source_unregister+0x129/0x3f0
 mmc_host_classdev_release+0x47/0x100
 device_release+0xc4/0x1f0
 kobject_put+0x222/0x550
 call_timer_fn+0x18d/0x5f0
 __run_timer_base+0x652/0x8b0
 run_timer_softirq+0xb7/0x170
 handle_softirqs+0x226/0x860
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:queue_work_on+0x162/0x1d0
Code: 00 4d 85 ed 75 16 e8 ad 90 39 00 eb 15 e8 a6 90 39 00 e8 f1 2b 57 0a 4d 85 ed 74 ea e8 97 90 39 00 fb 65 48 8b 05 d6 16 07 12 <48> 3b 44 24 18 75 56 89 d8 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc900077d6fc0 EFLAGS: 00000293
RAX: a1838ad56c892600 RBX: ffff888168106f01 RCX: ffff88816a638000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000008 R08: ffffffff907a5c7f R09: 1ffffffff20f4b8f
R10: dffffc0000000000 R11: fffffbfff20f4b90 R12: 0000000000000000
R13: 0000000000000200 R14: 0000000000000000 R15: 001fffffffc00001
 inet6addr_event+0x9f/0xd0
 notifier_call_chain+0x1a5/0x3d0
 atomic_notifier_call_chain+0xda/0x180
 addrconf_ifdown+0xe87/0x1a30
 addrconf_notify+0x1bc/0x1050
 notifier_call_chain+0x1a5/0x3d0
 netif_close_many+0x463/0x660
 unregister_netdevice_many_notify+0x843/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
 </TASK>
ODEBUG: object ffffc90000a18a80 is NOT on stack ffffc900077d0000, but annotated.
------------[ cut here ]------------
1
WARNING: lib/debugobjects.c:672 at __debug_object_init+0x2c4/0x3c0, CPU#1: kworker/u8:4/6068
Modules linked in:
CPU: 1 UID: 0 PID: 6068 Comm: kworker/u8:4 Tainted: G        W    L      syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN, [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
RIP: 0010:__debug_object_init+0x2c4/0x3c0
Code: cc cc cc 41 ff c7 44 89 3d 09 dc e7 15 48 c7 c1 80 d5 6d 8c 48 c7 c7 e0 d5 6d 8c 84 c0 48 0f 45 f9 48 89 de e8 ad 92 3c fc 90 <0f> 0b 90 e9 c0 fe ff ff e8 4f 1c 00 00 8b 05 e1 a9 6d 0a 3b 05 df
RSP: 0018:ffffc90000a189b8 EFLAGS: 00010046
RAX: 0000000000000050 RBX: ffffc90000a18a80 RCX: a1838ad56c892600
RDX: 0000000000000100 RSI: 0000000000000100 RDI: 0000000000000000
RBP: ffff88816a638020 R08: 0000000000000100 R09: 1ffff920001430e4
R10: dffffc0000000000 R11: fffff520001430e5 R12: ffff88816cc8e0c0
R13: ffff88816f461b98 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8882a8ccc000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8a52dffffc CR3: 000000000eb48000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 __synchronize_srcu+0x1d5/0x2f0
 wakeup_source_unregister+0x129/0x3f0
 mmc_host_classdev_release+0x47/0x100
 device_release+0xc4/0x1f0
 kobject_put+0x222/0x550
 call_timer_fn+0x18d/0x5f0
 __run_timer_base+0x652/0x8b0
 run_timer_softirq+0xb7/0x170
 handle_softirqs+0x226/0x860
 __irq_exit_rcu+0xcb/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:queue_work_on+0x162/0x1d0
Code: 00 4d 85 ed 75 16 e8 ad 90 39 00 eb 15 e8 a6 90 39 00 e8 f1 2b 57 0a 4d 85 ed 74 ea e8 97 90 39 00 fb 65 48 8b 05 d6 16 07 12 <48> 3b 44 24 18 75 56 89 d8 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc900077d6fc0 EFLAGS: 00000293
RAX: a1838ad56c892600 RBX: ffff888168106f01 RCX: ffff88816a638000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000008 R08: ffffffff907a5c7f R09: 1ffffffff20f4b8f
R10: dffffc0000000000 R11: fffffbfff20f4b90 R12: 0000000000000000
R13: 0000000000000200 R14: 0000000000000000 R15: 001fffffffc00001
 inet6addr_event+0x9f/0xd0
 notifier_call_chain+0x1a5/0x3d0
 atomic_notifier_call_chain+0xda/0x180
 addrconf_ifdown+0xe87/0x1a30
 addrconf_notify+0x1bc/0x1050
 notifier_call_chain+0x1a5/0x3d0
 netif_close_many+0x463/0x660
 unregister_netdevice_many_notify+0x843/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
 </TASK>
