BUG: sleeping function called from invalid context at kernel/workqueue.c:4561
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 9, name: kworker/0:0
preempt_count: 100, expected: 0
RCU nest depth: 1, expected: 0
locks held by kworker/0:0/9: 8, last CPU#0:
 #0: ffff888102f1e140 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc900000e7c40 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffff88816ab3d1d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4d30
 #3: ffff888102b8a1d8 (&dev->mutex){....}-{4:4}, at: usb_disconnect+0xfc/0x9a0
 #4: ffff8881012d42a0 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x3f/0x140
 #5: ffff8881012d4180 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x4e/0x140
 #6: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: unwind_next_frame+0x8f/0x2550
 #7: ffffc90000007cc0 ((&vub300->inactivity_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0
Preemption disabled at:
[<ffffffff8188f39b>] handle_softirqs+0xab/0x860
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 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: usb_hub_wq hub_event
Call Trace:
 <IRQ>
 dump_stack_lvl+0xe8/0x150
 __might_resched+0x36a/0x4c0
 __cancel_work_sync+0x6d/0x110
 mmc_free_host+0x19/0x40
 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:unwind_next_frame+0x9a0/0x2550
Code: 03 42 80 3c 20 00 74 08 48 89 df e8 3a e4 bf 00 48 8b 3b 48 85 ff 0f 84 db 0d 00 00 48 83 c7 50 e9 2d 01 00 00 48 8b 44 24 38 <42> 80 3c 20 00 74 0c 48 89 ef e8 11 e4 bf 00 49 8d 55 04 4c 8b 45
RSP: 0018:ffffc900000e7080 EFLAGS: 00000246
RAX: 1ffff9200001ce2c RBX: 0000000000000003 RCX: ffffffff90963264
RDX: ffffffff911643c2 RSI: ffffffff911643be RDI: ffffffff8c6da820
RBP: ffffc900000e7160 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc900000e7178 R11: ffffffff81b293f0 R12: dffffc0000000000
R13: ffffffff911643be R14: ffffc900000e7128 R15: 1ffff9200001ce25
 arch_stack_walk+0x11b/0x150
 stack_trace_save+0xa9/0x100
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0xee/0x8b0
 kernfs_put+0x622/0x820
 kernfs_remove_by_name_ns+0xc8/0x140
 sysfs_unmerge_group+0xd3/0x140
 dpm_sysfs_remove+0x76/0xd0
 device_del+0x250/0x8f0
 device_unregister+0x21/0xf0
 usb_remove_ep_devs+0x50/0x80
 usb_disconnect+0x5da/0x9a0
 hub_event+0x1bbb/0x4d30
 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          
-----------------------------
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/0:0/9: 8, last CPU#0:
 #0: ffff888102f1e140 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc900000e7c40 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffff88816ab3d1d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4d30
 #3: ffff888102b8a1d8 (&dev->mutex){....}-{4:4}, at: usb_disconnect+0xfc/0x9a0
 #4: ffff8881012d42a0 (&root->kernfs_supers_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x3f/0x140
 #5: ffff8881012d4180 (&root->kernfs_rwsem){++++}-{4:4}, at: kernfs_remove_by_name_ns+0x4e/0x140
 #6: ffffffff8ed5c920 (rcu_read_lock){....}-{1:3}, at: unwind_next_frame+0x8f/0x2550
 #7: ffffc90000007cc0 ((&vub300->inactivity_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x5f0

stack backtrace:
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Tainted: G        W           syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: usb_hub_wq hub_event
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:unwind_next_frame+0x9a0/0x2550
Code: 03 42 80 3c 20 00 74 08 48 89 df e8 3a e4 bf 00 48 8b 3b 48 85 ff 0f 84 db 0d 00 00 48 83 c7 50 e9 2d 01 00 00 48 8b 44 24 38 <42> 80 3c 20 00 74 0c 48 89 ef e8 11 e4 bf 00 49 8d 55 04 4c 8b 45
RSP: 0018:ffffc900000e7080 EFLAGS: 00000246
RAX: 1ffff9200001ce2c RBX: 0000000000000003 RCX: ffffffff90963264
RDX: ffffffff911643c2 RSI: ffffffff911643be RDI: ffffffff8c6da820
RBP: ffffc900000e7160 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc900000e7178 R11: ffffffff81b293f0 R12: dffffc0000000000
R13: ffffffff911643be R14: ffffc900000e7128 R15: 1ffff9200001ce25
 arch_stack_walk+0x11b/0x150
 stack_trace_save+0xa9/0x100
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0xee/0x8b0
 kernfs_put+0x622/0x820
 kernfs_remove_by_name_ns+0xc8/0x140
 sysfs_unmerge_group+0xd3/0x140
 dpm_sysfs_remove+0x76/0xd0
 device_del+0x250/0x8f0
 device_unregister+0x21/0xf0
 usb_remove_ep_devs+0x50/0x80
 usb_disconnect+0x5da/0x9a0
 hub_event+0x1bbb/0x4d30
 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 ffffc90000007a80 is NOT on stack ffffc900000e0000, but annotated.
------------[ cut here ]------------
1
WARNING: lib/debugobjects.c:672 at __debug_object_init+0x2c4/0x3c0, CPU#0: kworker/0:0/9
Modules linked in:
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Tainted: G        W           syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: usb_hub_wq hub_event
RIP: 0010:__debug_object_init+0x2c4/0x3c0
Code: fe 06 cc 41 ff c7 44 89 3d e9 2c e8 15 48 c7 c1 80 b1 6d 8c 48 c7 c7 e0 b1 6d 8c 84 c0 48 0f 45 f9 48 89 de e8 2d cf 3c fc 90 <0f> 0b 90 e9 c0 fe ff ff e8 4f 1c 00 00 8b 05 01 d2 6d 0a 3b 05 ff
RSP: 0018:ffffc900000079b8 EFLAGS: 00010046
RAX: 0000000000000050 RBX: ffffc90000007a80 RCX: 9b8f538c4b96d700
RDX: 0000000000000100 RSI: 0000000000000100 RDI: 0000000000000000
RBP: ffff888102eb5a20 R08: 0000000000000100 R09: 1ffffffff1ed222c
R10: dffffc0000000000 R11: fffffbfff1ed222d R12: ffff888171f99130
R13: ffff8881104a25b0 R14: dffffc0000000000 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff88818d6cb000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7192feb840 CR3: 0000000117380000 CR4: 00000000000006f0
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:unwind_next_frame+0x9a0/0x2550
Code: 03 42 80 3c 20 00 74 08 48 89 df e8 3a e4 bf 00 48 8b 3b 48 85 ff 0f 84 db 0d 00 00 48 83 c7 50 e9 2d 01 00 00 48 8b 44 24 38 <42> 80 3c 20 00 74 0c 48 89 ef e8 11 e4 bf 00 49 8d 55 04 4c 8b 45
RSP: 0018:ffffc900000e7080 EFLAGS: 00000246
RAX: 1ffff9200001ce2c RBX: 0000000000000003 RCX: ffffffff90963264
RDX: ffffffff911643c2 RSI: ffffffff911643be RDI: ffffffff8c6da820
RBP: ffffc900000e7160 R08: 0000000000000003 R09: 0000000000000000
R10: ffffc900000e7178 R11: ffffffff81b293f0 R12: dffffc0000000000
R13: ffffffff911643be R14: ffffc900000e7128 R15: 1ffff9200001ce25
 arch_stack_walk+0x11b/0x150
 stack_trace_save+0xa9/0x100
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0xee/0x8b0
 kernfs_put+0x622/0x820
 kernfs_remove_by_name_ns+0xc8/0x140
 sysfs_unmerge_group+0xd3/0x140
 dpm_sysfs_remove+0x76/0xd0
 device_del+0x250/0x8f0
 device_unregister+0x21/0xf0
 usb_remove_ep_devs+0x50/0x80
 usb_disconnect+0x5da/0x9a0
 hub_event+0x1bbb/0x4d30
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>
