======================================================== WARNING: possible irq lock inversion dependency detected 5.5.0-rc2-syzkaller #0 Not tainted -------------------------------------------------------- kworker/1:2/2115 just changed the state of lock: ffff8881d4df8018 (&(&dum_hcd->dum->lock)->rlock){+.-.}, at: spin_lock include/linux/spinlock.h:338 [inline] ffff8881d4df8018 (&(&dum_hcd->dum->lock)->rlock){+.-.}, at: dummy_timer+0x1245/0x2fdb drivers/usb/gadget/udc/dummy_hcd.c:1967 but this lock was taken by another, HARDIRQ-safe lock in the past: (&(&dev->event_lock)->rlock){-.-.} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &(&dev->event_lock)->rlock --> &(&xpad->odata_lock)->rlock --> &(&dum_hcd->dum->lock)->rlock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&dum_hcd->dum->lock)->rlock); local_irq_disable(); lock(&(&dev->event_lock)->rlock); lock(&(&xpad->odata_lock)->rlock); lock(&(&dev->event_lock)->rlock); *** DEADLOCK *** 7 locks held by kworker/1:2/2115: #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:226 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:615 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:642 [inline] #0: ffff8881d8d67928 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x827/0x1530 kernel/workqueue.c:2235 #1: ffff8881c61d7dd0 ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x85b/0x1530 kernel/workqueue.c:2239 #2: ffff8881d4ebe200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1493 [inline] #2: ffff8881d4ebe200 (&dev->mutex){....}, at: hub_event+0x1b2/0x3860 drivers/usb/core/hub.c:5498 #3: ffff8881ae3ad200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1493 [inline] #3: ffff8881ae3ad200 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:871 #4: ffff8881cb520190 (&dev->mutex){....}, at: device_lock include/linux/device.h:1493 [inline] #4: ffff8881cb520190 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:871 #5: ffffffff86ef58c0 (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1716 [inline] #5: ffffffff86ef58c0 (console_lock){+.+.}, at: vprintk_emit+0x158/0x3d0 kernel/printk/printk.c:1995 #6: ffff8881db309d70 ((&dum_hcd->timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:172 [inline] #6: ffff8881db309d70 ((&dum_hcd->timer)){+.-.}, at: call_timer_fn+0xcd/0x650 kernel/time/timer.c:1394 the shortest dependencies between 2nd lock and 1st lock: -> (&(&dev->event_lock)->rlock){-.-.} { IN-HARDIRQ-W at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 input_event drivers/input/input.c:439 [inline] input_event+0x7b/0xb0 drivers/input/input.c:432 input_report_key include/linux/input.h:417 [inline] psmouse_report_standard_buttons+0x2c/0x80 drivers/input/mouse/psmouse-base.c:123 psmouse_report_standard_packet drivers/input/mouse/psmouse-base.c:141 [inline] psmouse_process_byte+0x1e1/0x890 drivers/input/mouse/psmouse-base.c:232 psmouse_handle_byte+0x41/0x1b0 drivers/input/mouse/psmouse-base.c:274 psmouse_interrupt+0x2f7/0xe90 drivers/input/mouse/psmouse-base.c:426 serio_interrupt+0x88/0x150 drivers/input/serio/serio.c:1002 i8042_interrupt+0x266/0x500 drivers/input/serio/i8042.c:596 __handle_irq_event_percpu+0xee/0x7d0 kernel/irq/handle.c:149 handle_irq_event_percpu+0x76/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa2/0x12d kernel/irq/handle.c:206 handle_edge_irq+0x233/0x8a0 kernel/irq/chip.c:830 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline] do_IRQ+0x99/0x210 arch/x86/kernel/irq.c:250 ret_from_intr+0x0/0x31 orc_ip arch/x86/kernel/unwind_orc.c:27 [inline] __orc_find+0x83/0xf0 arch/x86/kernel/unwind_orc.c:49 orc_find arch/x86/kernel/unwind_orc.c:173 [inline] unwind_next_frame+0x316/0x19e0 arch/x86/kernel/unwind_orc.c:404 arch_stack_walk+0x74/0xd0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x9f/0xe0 kernel/stacktrace.c:123 save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:486 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2759 [inline] slab_alloc mm/slub.c:2767 [inline] __kmalloc_track_caller+0xf0/0x310 mm/slub.c:4335 kvasprintf+0xb5/0x150 lib/kasprintf.c:25 kasprintf+0xbb/0xf0 lib/kasprintf.c:59 make_driver_name drivers/base/module.c:16 [inline] module_add_driver+0xec/0x370 drivers/base/module.c:63 bus_add_driver+0x360/0x5a0 drivers/base/bus.c:625 driver_register+0x1c4/0x330 drivers/base/driver.c:170 usb_register_driver+0x244/0x460 drivers/usb/core/driver.c:962 do_one_initcall+0xf0/0x620 init/main.c:939 do_initcall_level init/main.c:1007 [inline] do_initcalls init/main.c:1015 [inline] do_basic_setup init/main.c:1032 [inline] kernel_init_freeable+0x4a4/0x548 init/main.c:1216 kernel_init+0xd/0x1b9 init/main.c:1110 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 IN-SOFTIRQ-W at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 ml_effect_timer+0x43/0x70 drivers/input/ff-memless.c:411 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] console_unlock+0xa1b/0xc30 kernel/printk/printk.c:2481 vprintk_emit+0x171/0x3d0 kernel/printk/printk.c:1996 dev_vprintk_emit+0x4fc/0x541 drivers/base/core.c:3603 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3614 __dev_printk+0x1db/0x203 drivers/base/core.c:3626 _dev_info+0xd7/0x109 drivers/base/core.c:3672 usb_disconnect+0x7f/0x8d0 drivers/usb/core/hub.c:2182 hub_port_connect drivers/usb/core/hub.c:5035 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1753/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 INITIAL USE at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 input_inject_event+0xa6/0x31e drivers/input/input.c:465 __led_set_brightness drivers/leds/led-core.c:46 [inline] led_set_brightness_nopm+0x48/0xf0 drivers/leds/led-core.c:273 led_set_brightness_nosleep drivers/leds/led-core.c:290 [inline] led_set_brightness drivers/leds/led-core.c:265 [inline] led_set_brightness+0x11c/0x240 drivers/leds/led-core.c:241 led_trigger_event drivers/leds/led-triggers.c:373 [inline] led_trigger_event+0x70/0xd0 drivers/leds/led-triggers.c:363 kbd_led_trigger_activate+0xf5/0x130 drivers/tty/vt/keyboard.c:998 led_trigger_set+0x61a/0xbd0 drivers/leds/led-triggers.c:185 led_trigger_set_default drivers/leds/led-triggers.c:248 [inline] led_trigger_set_default+0x135/0x1a0 drivers/leds/led-triggers.c:236 led_classdev_register_ext+0x4e1/0x670 drivers/leds/led-class.c:316 led_classdev_register include/linux/leds.h:181 [inline] input_leds_connect+0x3df/0x6af drivers/input/input-leds.c:139 input_attach_handler+0x194/0x200 drivers/input/input.c:1024 input_register_device.cold+0xf5/0x246 drivers/input/input.c:2224 atkbd_connect+0x63b/0x800 drivers/input/keyboard/atkbd.c:1198 serio_connect_driver+0x46/0x70 drivers/input/serio/serio.c:47 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 device_driver_attach+0x108/0x140 drivers/base/dd.c:995 __driver_attach+0xda/0x240 drivers/base/dd.c:1072 bus_for_each_dev+0x14b/0x1d0 drivers/base/bus.c:304 serio_attach_driver drivers/input/serio/serio.c:808 [inline] serio_handle_event+0x54a/0x850 drivers/input/serio/serio.c:227 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 } ... key at: [] __key.35515+0x0/0x40 ... acquired at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 xpad_play_effect+0xfe/0xc50 drivers/input/joystick/xpad.c:1225 ml_play_effects+0x817/0x1270 drivers/input/ff-memless.c:398 ml_ff_playback+0x285/0x3d0 drivers/input/ff-memless.c:460 input_ff_event+0x13a/0x2e0 drivers/input/ff-core.c:286 input_handle_event+0x732/0x13a0 drivers/input/input.c:375 input_inject_event+0x305/0x31e drivers/input/input.c:470 evdev_write+0x2c9/0x410 drivers/input/evdev.c:542 __vfs_write+0x76/0x100 fs/read_write.c:494 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x1e8/0x250 fs/read_write.c:611 do_syscall_64+0xb6/0x5c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> (&(&xpad->odata_lock)->rlock){..-.} { IN-SOFTIRQ-W at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 xpad_irq_out+0x9e/0x2b0 drivers/input/joystick/xpad.c:1036 __usb_hcd_giveback_urb+0x29a/0x550 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716 dummy_timer+0x123d/0x2fdb drivers/usb/gadget/udc/dummy_hcd.c:1966 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline] default_idle+0x28/0x2e0 arch/x86/kernel/process.c:699 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3c3/0x4e0 kernel/sched/idle.c:269 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:361 start_kernel+0x8b1/0x8eb init/main.c:785 secondary_startup_64+0xb6/0xc0 arch/x86/kernel/head_64.S:242 INITIAL USE at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 xpad_send_led_command drivers/input/joystick/xpad.c:1356 [inline] xpad_led_set+0x59/0x5a0 drivers/input/joystick/xpad.c:1405 __led_set_brightness drivers/leds/led-core.c:46 [inline] led_set_brightness_nopm+0x48/0xf0 drivers/leds/led-core.c:273 led_set_brightness_nosleep drivers/leds/led-core.c:290 [inline] led_set_brightness drivers/leds/led-core.c:265 [inline] led_set_brightness+0x11c/0x240 drivers/leds/led-core.c:241 xpad_identify_controller drivers/input/joystick/xpad.c:1396 [inline] xpad_led_probe drivers/input/joystick/xpad.c:1439 [inline] xpad_init_input+0xdc0/0x1160 drivers/input/joystick/xpad.c:1681 xpad_probe+0x1129/0x1b20 drivers/input/joystick/xpad.c:1827 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 hub_port_connect drivers/usb/core/hub.c:5184 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1e59/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 } ... key at: [] __key.33357+0x0/0x40 ... acquired at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 dummy_urb_enqueue+0x109/0x890 drivers/usb/gadget/udc/dummy_hcd.c:1257 usb_hcd_submit_urb+0x2aa/0x1ee0 drivers/usb/core/hcd.c:1547 usb_submit_urb+0x6e5/0x13b0 drivers/usb/core/urb.c:570 xpad_try_sending_next_out_packet drivers/input/joystick/xpad.c:1013 [inline] xpad_try_sending_next_out_packet+0xf3/0x170 drivers/input/joystick/xpad.c:1007 xpad_inquiry_pad_presence drivers/input/joystick/xpad.c:1158 [inline] xpad360w_start_input+0x385/0x4a0 drivers/input/joystick/xpad.c:1534 xpad_probe+0x1552/0x1b20 drivers/input/joystick/xpad.c:1815 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 hub_port_connect drivers/usb/core/hub.c:5184 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1e59/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 -> (&(&dum_hcd->dum->lock)->rlock){+.-.} { HARDIRQ-ON-W at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] dummy_timer+0x1245/0x2fdb drivers/usb/gadget/udc/dummy_hcd.c:1967 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] console_unlock+0xa1b/0xc30 kernel/printk/printk.c:2481 vprintk_emit+0x171/0x3d0 kernel/printk/printk.c:1996 dev_vprintk_emit+0x4fc/0x541 drivers/base/core.c:3603 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3614 __dev_printk+0x1db/0x203 drivers/base/core.c:3626 _dev_info+0xd7/0x109 drivers/base/core.c:3672 wdm_create.cold+0x6c/0xa2 drivers/usb/class/cdc-wdm.c:887 wdm_probe+0x220/0x2d0 drivers/usb/class/cdc-wdm.c:932 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 hub_port_connect drivers/usb/core/hub.c:5184 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1e59/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 process_scheduled_works kernel/workqueue.c:2326 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2412 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 IN-SOFTIRQ-W at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 dummy_hub_status+0x47/0x330 drivers/usb/gadget/udc/dummy_hcd.c:2000 usb_hcd_poll_rh_status+0x125/0x600 drivers/usb/core/hcd.c:765 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 get_current arch/x86/include/asm/current.h:15 [inline] __sanitizer_cov_trace_pc+0x9/0x60 kernel/kcov.c:197 lookup_fast+0x4ed/0xdf0 fs/namei.c:1631 walk_component+0xe3/0x19f0 fs/namei.c:1798 link_path_walk.part.0+0x90d/0x1230 fs/namei.c:2128 link_path_walk fs/namei.c:2059 [inline] path_openat+0x1f1/0x3e70 fs/namei.c:3536 do_filp_open+0x1a1/0x280 fs/namei.c:3567 do_sys_open+0x3c0/0x580 fs/open.c:1097 do_syscall_64+0xb6/0x5c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe INITIAL USE at: lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159 dummy_hub_control+0xa3/0x13f0 drivers/usb/gadget/udc/dummy_hcd.c:2088 rh_call_control drivers/usb/core/hcd.c:683 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:842 [inline] usb_hcd_submit_urb+0xe6d/0x1ee0 drivers/usb/core/hcd.c:1543 usb_submit_urb+0x6e5/0x13b0 drivers/usb/core/urb.c:570 usb_start_wait_urb+0x108/0x2b0 drivers/usb/core/message.c:57 usb_internal_control_msg drivers/usb/core/message.c:101 [inline] usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:152 get_hub_descriptor drivers/usb/core/hub.c:387 [inline] hub_configure drivers/usb/core/hub.c:1393 [inline] hub_probe.cold+0xbb8/0x2204 drivers/usb/core/hub.c:1865 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 register_root_hub drivers/usb/core/hcd.c:1009 [inline] usb_add_hcd.cold+0x1103/0x14aa drivers/usb/core/hcd.c:2793 dummy_hcd_probe+0x19f/0x312 drivers/usb/gadget/udc/dummy_hcd.c:2639 platform_drv_probe+0xce/0x1a0 drivers/base/platform.c:725 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 platform_device_add+0x34d/0x6c0 drivers/base/platform.c:562 init+0x4b5/0x997 drivers/char/agp/backend.c:340 do_one_initcall+0xf0/0x620 init/main.c:939 do_initcall_level init/main.c:1007 [inline] do_initcalls init/main.c:1015 [inline] do_basic_setup init/main.c:1032 [inline] kernel_init_freeable+0x4a4/0x548 init/main.c:1216 kernel_init+0xd/0x1b9 init/main.c:1110 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 } ... key at: [] __key.37266+0x0/0x40 ... acquired at: mark_lock_irq kernel/locking/lockdep.c:3317 [inline] mark_lock+0x510/0x1160 kernel/locking/lockdep.c:3666 mark_usage kernel/locking/lockdep.c:3580 [inline] __lock_acquire+0x1188/0x3b60 kernel/locking/lockdep.c:3909 lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] dummy_timer+0x1245/0x2fdb drivers/usb/gadget/udc/dummy_hcd.c:1967 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] console_unlock+0xa1b/0xc30 kernel/printk/printk.c:2481 vprintk_emit+0x171/0x3d0 kernel/printk/printk.c:1996 dev_vprintk_emit+0x4fc/0x541 drivers/base/core.c:3603 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3614 __dev_printk+0x1db/0x203 drivers/base/core.c:3626 _dev_info+0xd7/0x109 drivers/base/core.c:3672 wdm_create.cold+0x6c/0xa2 drivers/usb/class/cdc-wdm.c:887 wdm_probe+0x220/0x2d0 drivers/usb/class/cdc-wdm.c:932 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 hub_port_connect drivers/usb/core/hub.c:5184 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1e59/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 process_scheduled_works kernel/workqueue.c:2326 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2412 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 stack backtrace: CPU: 1 PID: 2115 Comm: kworker/1:2 Not tainted 5.5.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xef/0x16e lib/dump_stack.c:118 print_irq_inversion_bug kernel/locking/lockdep.c:3180 [inline] check_usage_backwards.cold+0x1d/0x26 kernel/locking/lockdep.c:3231 mark_lock_irq kernel/locking/lockdep.c:3317 [inline] mark_lock+0x510/0x1160 kernel/locking/lockdep.c:3666 mark_usage kernel/locking/lockdep.c:3580 [inline] __lock_acquire+0x1188/0x3b60 kernel/locking/lockdep.c:3909 lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4485 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] dummy_timer+0x1245/0x2fdb drivers/usb/gadget/udc/dummy_hcd.c:1967 call_timer_fn+0x179/0x650 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5e3/0x1490 kernel/time/timer.c:1786 __do_softirq+0x221/0x912 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x12f/0x500 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:85 [inline] RIP: 0010:console_unlock+0xa1b/0xc30 kernel/printk/printk.c:2481 Code: 00 89 ee 48 c7 c7 c0 6a f3 86 e8 30 bb 03 00 65 ff 0d d1 04 d9 7e e9 ea f9 ff ff e8 9f f5 15 00 e8 8a 38 1b 00 ff 74 24 30 9d 18 fe ff ff e8 8b f5 15 00 48 8d 7d 08 48 89 f8 48 c1 e8 03 42 RSP: 0018:ffff8881c61d6d30 EFLAGS: 00000216 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000200 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8881ce5c884c RBP: 0000000000000000 R08: ffff8881ce5c8000 R09: fffffbfff11f20ad R10: fffffbfff11f20ac R11: ffffffff88f90567 R12: 0000000000000043 R13: dffffc0000000000 R14: ffffffff829b1110 R15: ffffffff87283510 vprintk_emit+0x171/0x3d0 kernel/printk/printk.c:1996 dev_vprintk_emit+0x4fc/0x541 drivers/base/core.c:3603 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3614 __dev_printk+0x1db/0x203 drivers/base/core.c:3626 _dev_info+0xd7/0x109 drivers/base/core.c:3672 wdm_create.cold+0x6c/0xa2 drivers/usb/class/cdc-wdm.c:887 wdm_probe+0x220/0x2d0 drivers/usb/class/cdc-wdm.c:932 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_set_configuration+0xe67/0x1740 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0x99/0x100 drivers/usb/core/driver.c:266 really_probe+0x281/0x6d0 drivers/base/dd.c:548 driver_probe_device+0x104/0x210 drivers/base/dd.c:721 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:828 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:430 __device_attach+0x217/0x360 drivers/base/dd.c:894 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:490 device_add+0x1480/0x1c20 drivers/base/core.c:2487 usb_new_device.cold+0x6a4/0xe79 drivers/usb/core/hub.c:2537 hub_port_connect drivers/usb/core/hub.c:5184 [inline] hub_port_connect_change drivers/usb/core/hub.c:5324 [inline] port_event drivers/usb/core/hub.c:5470 [inline] hub_event+0x1e59/0x3860 drivers/usb/core/hub.c:5552 process_one_work+0x92b/0x1530 kernel/workqueue.c:2264 process_scheduled_works kernel/workqueue.c:2326 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2412 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352