usb 6-1: USB disconnect, device number 7 ======================================================== WARNING: possible irq lock inversion dependency detected 5.12.0-rc7-syzkaller #0 Not tainted -------------------------------------------------------- kworker/1:5/7391 just changed the state of lock: ffff888108e5c018 (&new->fa_lock){.+..}-{2:2}, at: kill_fasync_rcu fs/fcntl.c:1012 [inline] ffff888108e5c018 (&new->fa_lock){.+..}-{2:2}, at: kill_fasync fs/fcntl.c:1033 [inline] ffff888108e5c018 (&new->fa_lock){.+..}-{2:2}, at: kill_fasync+0x14d/0x470 fs/fcntl.c:1026 but this lock was taken by another, HARDIRQ-safe lock in the past: (&dev->event_lock){-.-.}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &dev->event_lock --> &client->buffer_lock --> &new->fa_lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&new->fa_lock); local_irq_disable(); lock(&dev->event_lock); lock(&client->buffer_lock); lock(&dev->event_lock); *** DEADLOCK *** 9 locks held by kworker/1:5/7391: #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:616 [inline] #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:643 [inline] #0: ffff888103fb4d38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x871/0x1580 kernel/workqueue.c:2246 #1: ffffc90005c0fda8 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x8a5/0x1580 kernel/workqueue.c:2250 #2: ffff888109318220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:740 [inline] #2: ffff888109318220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c1/0x4320 drivers/usb/core/hub.c:5590 #3: ffff888112218220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:740 [inline] #3: ffff888112218220 (&dev->mutex){....}-{3:3}, at: usb_disconnect.cold+0x43/0x791 drivers/usb/core/hub.c:2210 #4: ffff888116b9f1a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:740 [inline] #4: ffff888116b9f1a8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:982 [inline] #4: ffff888116b9f1a8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal drivers/base/dd.c:1189 [inline] #4: ffff888116b9f1a8 (&dev->mutex){....}-{3:3}, at: device_release_driver+0x1c/0x40 drivers/base/dd.c:1215 #5: ffff888116d61ab0 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:740 [inline] #5: ffff888116d61ab0 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:982 [inline] #5: ffff888116d61ab0 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal drivers/base/dd.c:1189 [inline] #5: ffff888116d61ab0 (&dev->mutex){....}-{3:3}, at: device_release_driver+0x1c/0x40 drivers/base/dd.c:1215 #6: ffffffff8850d808 (input_mutex){+.+.}-{3:3}, at: __input_unregister_device+0x16d/0x470 drivers/input/input.c:2186 #7: ffff88810a085080 (&evdev->client_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #7: ffff88810a085080 (&evdev->client_lock){+.+.}-{2:2}, at: evdev_hangup drivers/input/evdev.c:427 [inline] #7: ffff88810a085080 (&evdev->client_lock){+.+.}-{2:2}, at: evdev_cleanup+0x66/0x1a0 drivers/input/evdev.c:1324 #8: ffffffff87a78a20 (rcu_read_lock){....}-{1:2}, at: kill_fasync+0x3d/0x470 fs/fcntl.c:1031 the shortest dependencies between 2nd lock and 1st lock: -> (&dev->event_lock){-.-.}-{2:2} { IN-HARDIRQ-W at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 input_event drivers/input/input.c:445 [inline] input_event+0x7b/0xb0 drivers/input/input.c:438 input_report_key include/linux/input.h:425 [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+0x304/0xf00 drivers/input/mouse/psmouse-base.c:426 serio_interrupt+0x88/0x150 drivers/input/serio/serio.c:1002 i8042_interrupt+0x27a/0x520 drivers/input/serio/i8042.c:602 __handle_irq_event_percpu+0x303/0x870 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:213 handle_edge_irq+0x247/0xcf0 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0x77/0x190 arch/x86/kernel/irq.c:250 common_interrupt+0x76/0xa0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:623 __preempt_count_sub arch/x86/include/asm/preempt.h:85 [inline] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] _raw_spin_unlock_irq+0x27/0x30 kernel/locking/spinlock.c:199 worker_thread+0x147/0x1120 kernel/workqueue.c:2441 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 IN-SOFTIRQ-W at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 input_event drivers/input/input.c:445 [inline] input_event+0x7b/0xb0 drivers/input/input.c:438 hidinput_hid_event+0x14d3/0x18b0 drivers/hid/hid-input.c:1405 hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1522 hid_input_field drivers/hid/hid-core.c:1566 [inline] hid_report_raw_event+0xcf6/0x11b0 drivers/hid/hid-core.c:1786 hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:1853 hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f4/0x32a0 drivers/usb/gadget/udc/dummy_hcd.c:1971 call_timer_fn+0x1a5/0x630 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa10 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1758 __do_softirq+0x1b0/0x944 kernel/softirq.c:345 invoke_softirq kernel/softirq.c:221 [inline] __irq_exit_rcu kernel/softirq.c:422 [inline] irq_exit_rcu+0x110/0x1a0 kernel/softirq.c:434 sysvec_apic_timer_interrupt+0x6a/0x90 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 check_kcov_mode kernel/kcov.c:165 [inline] __sanitizer_cov_trace_pc+0x37/0x60 kernel/kcov.c:197 tomoyo_path_matches_pattern+0x110/0x280 security/tomoyo/util.c:948 tomoyo_compare_name_union security/tomoyo/file.c:87 [inline] tomoyo_compare_name_union security/tomoyo/file.c:82 [inline] tomoyo_check_path_acl security/tomoyo/file.c:260 [inline] tomoyo_check_path_acl+0x180/0x210 security/tomoyo/file.c:252 tomoyo_check_acl+0x13c/0x450 security/tomoyo/domain.c:175 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x33e/0x380 security/tomoyo/file.c:777 tomoyo_file_open security/tomoyo/tomoyo.c:313 [inline] tomoyo_file_open+0xa3/0xd0 security/tomoyo/tomoyo.c:308 security_file_open+0x52/0x4f0 security/security.c:1589 do_dentry_open+0x353/0x1090 fs/open.c:813 do_open fs/namei.c:3367 [inline] path_openat+0x1c0e/0x27e0 fs/namei.c:3500 do_filp_open+0x190/0x3d0 fs/namei.c:3527 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 input_inject_event+0xa6/0x320 drivers/input/input.c:471 __led_set_brightness drivers/leds/led-core.c:47 [inline] led_set_brightness_nopm drivers/leds/led-core.c:271 [inline] led_set_brightness_nosleep+0xe6/0x1a0 drivers/leds/led-core.c:287 led_set_brightness+0x134/0x170 drivers/leds/led-core.c:264 led_trigger_event drivers/leds/led-triggers.c:388 [inline] led_trigger_event+0x75/0xd0 drivers/leds/led-triggers.c:377 kbd_led_trigger_activate+0xfa/0x130 drivers/tty/vt/keyboard.c:1029 led_trigger_set+0x61e/0xbd0 drivers/leds/led-triggers.c:195 led_trigger_set_default drivers/leds/led-triggers.c:259 [inline] led_trigger_set_default+0x1a6/0x230 drivers/leds/led-triggers.c:246 led_classdev_register_ext+0x5b1/0x7c0 drivers/leds/led-class.c:416 led_classdev_register include/linux/leds.h:190 [inline] input_leds_connect+0x3fb/0x740 drivers/input/input-leds.c:139 input_attach_handler+0x180/0x1f0 drivers/input/input.c:1035 input_register_device.cold+0xf0/0x307 drivers/input/input.c:2335 atkbd_connect+0x739/0xa10 drivers/input/keyboard/atkbd.c:1293 serio_connect_driver drivers/input/serio/serio.c:47 [inline] serio_driver_probe+0x72/0xa0 drivers/input/serio/serio.c:778 really_probe+0x291/0xe60 drivers/base/dd.c:559 driver_probe_device+0x26b/0x3d0 drivers/base/dd.c:745 device_driver_attach+0x228/0x290 drivers/base/dd.c:1020 __driver_attach+0x15b/0x2f0 drivers/base/dd.c:1097 bus_for_each_dev+0x147/0x1d0 drivers/base/bus.c:305 serio_attach_driver drivers/input/serio/serio.c:808 [inline] serio_handle_event+0x5f6/0xa30 drivers/input/serio/serio.c:227 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 } ... key at: [] __key.8+0x0/0x40 ... acquired at: __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:354 [inline] evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x297/0x3f0 drivers/input/evdev.c:306 input_to_handler+0x2a0/0x4c0 drivers/input/input.c:115 input_pass_values.part.0+0x28d/0x700 drivers/input/input.c:145 input_pass_values drivers/input/input.c:415 [inline] input_handle_event+0x67e/0x1440 drivers/input/input.c:415 input_event drivers/input/input.c:446 [inline] input_event+0x8e/0xb0 drivers/input/input.c:438 hidinput_hid_event+0x14d3/0x18b0 drivers/hid/hid-input.c:1405 hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1522 hid_input_field drivers/hid/hid-core.c:1580 [inline] hid_report_raw_event+0xe7f/0x11b0 drivers/hid/hid-core.c:1786 hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:1853 hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f4/0x32a0 drivers/usb/gadget/udc/dummy_hcd.c:1971 call_timer_fn+0x1a5/0x630 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa10 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1758 __do_softirq+0x1b0/0x944 kernel/softirq.c:345 invoke_softirq kernel/softirq.c:221 [inline] __irq_exit_rcu kernel/softirq.c:422 [inline] irq_exit_rcu+0x110/0x1a0 kernel/softirq.c:434 sysvec_apic_timer_interrupt+0x6a/0x90 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 __sanitizer_cov_trace_const_cmp1+0x7/0x80 kernel/kcov.c:269 tomoyo_domain_quota_is_ok+0x32a/0x550 security/tomoyo/util.c:1092 tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x419/0x590 security/tomoyo/file.c:734 security_path_chmod+0xe0/0x150 security/security.c:1161 chmod_common+0x156/0x440 fs/open.c:580 vfs_fchmod fs/open.c:601 [inline] __do_sys_fchmod fs/open.c:610 [inline] __se_sys_fchmod fs/open.c:604 [inline] __x64_sys_fchmod+0x10e/0x190 fs/open.c:604 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae -> (&client->buffer_lock){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __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:354 [inline] evdev_pass_values.part.0+0xf6/0x970 drivers/input/evdev.c:261 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x297/0x3f0 drivers/input/evdev.c:306 input_to_handler+0x2a0/0x4c0 drivers/input/input.c:115 input_pass_values.part.0+0x28d/0x700 drivers/input/input.c:145 input_pass_values drivers/input/input.c:415 [inline] input_handle_event+0x67e/0x1440 drivers/input/input.c:415 input_event drivers/input/input.c:446 [inline] input_event+0x8e/0xb0 drivers/input/input.c:438 hidinput_hid_event+0x14d3/0x18b0 drivers/hid/hid-input.c:1405 hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1522 hid_input_field drivers/hid/hid-core.c:1580 [inline] hid_report_raw_event+0xe7f/0x11b0 drivers/hid/hid-core.c:1786 hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:1853 hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f4/0x32a0 drivers/usb/gadget/udc/dummy_hcd.c:1971 call_timer_fn+0x1a5/0x630 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa10 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1758 __do_softirq+0x1b0/0x944 kernel/softirq.c:345 invoke_softirq kernel/softirq.c:221 [inline] __irq_exit_rcu kernel/softirq.c:422 [inline] irq_exit_rcu+0x110/0x1a0 kernel/softirq.c:434 sysvec_apic_timer_interrupt+0x6a/0x90 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 __sanitizer_cov_trace_const_cmp1+0x7/0x80 kernel/kcov.c:269 tomoyo_domain_quota_is_ok+0x32a/0x550 security/tomoyo/util.c:1092 tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x419/0x590 security/tomoyo/file.c:734 security_path_chmod+0xe0/0x150 security/security.c:1161 chmod_common+0x156/0x440 fs/open.c:580 vfs_fchmod fs/open.c:601 [inline] __do_sys_fchmod fs/open.c:610 [inline] __se_sys_fchmod fs/open.c:604 [inline] __x64_sys_fchmod+0x10e/0x190 fs/open.c:604 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 evdev_set_mask drivers/input/evdev.c:980 [inline] evdev_do_ioctl+0x2d7/0x1820 drivers/input/evdev.c:1117 evdev_ioctl_handler drivers/input/evdev.c:1272 [inline] evdev_ioctl+0x145/0x1a0 drivers/input/evdev.c:1281 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae } ... key at: [] __key.4+0x0/0x40 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x58/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x14d/0x470 fs/fcntl.c:1026 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values.part.0+0x64e/0x970 drivers/input/evdev.c:278 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x297/0x3f0 drivers/input/evdev.c:306 input_to_handler+0x2a0/0x4c0 drivers/input/input.c:115 input_pass_values.part.0+0x28d/0x700 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_pass_event drivers/input/input.c:171 [inline] input_dev_release_keys.part.0+0x112/0x160 drivers/input/input.c:719 input_dev_release_keys drivers/input/input.c:53 [inline] input_disconnect_device drivers/input/input.c:749 [inline] __input_unregister_device+0xc6/0x470 drivers/input/input.c:2184 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2379 hidinput_disconnect+0x15e/0x3d0 drivers/hid/hid-input.c:2003 hid_disconnect+0x13f/0x1a0 drivers/hid/hid-core.c:2029 hid_hw_stop drivers/hid/hid-core.c:2076 [inline] hid_device_remove+0x186/0x240 drivers/hid/hid-core.c:2319 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 hid_remove_device drivers/hid/hid-core.c:2488 [inline] hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 -> (&new->fa_lock){.+..}-{2:2} { HARDIRQ-ON-R at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x58/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x14d/0x470 fs/fcntl.c:1026 evdev_hangup drivers/input/evdev.c:429 [inline] evdev_cleanup+0xb6/0x1a0 drivers/input/evdev.c:1324 evdev_disconnect+0x45/0xb0 drivers/input/evdev.c:1407 __input_unregister_device+0x206/0x470 drivers/input/input.c:2189 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2379 hidinput_disconnect+0x15e/0x3d0 drivers/hid/hid-input.c:2003 hid_disconnect+0x13f/0x1a0 drivers/hid/hid-core.c:2029 hid_hw_stop drivers/hid/hid-core.c:2076 [inline] hid_device_remove+0x186/0x240 drivers/hid/hid-core.c:2319 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 hid_remove_device drivers/hid/hid-core.c:2488 [inline] hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 INITIAL READ USE at: lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x58/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x14d/0x470 fs/fcntl.c:1026 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values.part.0+0x64e/0x970 drivers/input/evdev.c:278 evdev_pass_values drivers/input/evdev.c:253 [inline] evdev_events+0x297/0x3f0 drivers/input/evdev.c:306 input_to_handler+0x2a0/0x4c0 drivers/input/input.c:115 input_pass_values.part.0+0x28d/0x700 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_pass_event drivers/input/input.c:171 [inline] input_dev_release_keys.part.0+0x112/0x160 drivers/input/input.c:719 input_dev_release_keys drivers/input/input.c:53 [inline] input_disconnect_device drivers/input/input.c:749 [inline] __input_unregister_device+0xc6/0x470 drivers/input/input.c:2184 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2379 hidinput_disconnect+0x15e/0x3d0 drivers/hid/hid-input.c:2003 hid_disconnect+0x13f/0x1a0 drivers/hid/hid-core.c:2029 hid_hw_stop drivers/hid/hid-core.c:2076 [inline] hid_device_remove+0x186/0x240 drivers/hid/hid-core.c:2319 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 hid_remove_device drivers/hid/hid-core.c:2488 [inline] hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 } ... key at: [] __key.0+0x0/0x40 ... acquired at: mark_usage kernel/locking/lockdep.c:4380 [inline] __lock_acquire+0x121f/0x54c0 kernel/locking/lockdep.c:4855 lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x58/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x14d/0x470 fs/fcntl.c:1026 evdev_hangup drivers/input/evdev.c:429 [inline] evdev_cleanup+0xb6/0x1a0 drivers/input/evdev.c:1324 evdev_disconnect+0x45/0xb0 drivers/input/evdev.c:1407 __input_unregister_device+0x206/0x470 drivers/input/input.c:2189 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2379 hidinput_disconnect+0x15e/0x3d0 drivers/hid/hid-input.c:2003 hid_disconnect+0x13f/0x1a0 drivers/hid/hid-core.c:2029 hid_hw_stop drivers/hid/hid-core.c:2076 [inline] hid_device_remove+0x186/0x240 drivers/hid/hid-core.c:2319 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 hid_remove_device drivers/hid/hid-core.c:2488 [inline] hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 stack backtrace: CPU: 1 PID: 7391 Comm: kworker/1:5 Not tainted 5.12.0-rc7-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:79 [inline] dump_stack+0x143/0x1db lib/dump_stack.c:120 print_irq_inversion_bug kernel/locking/lockdep.c:202 [inline] check_usage_backwards kernel/locking/lockdep.c:3952 [inline] mark_lock_irq kernel/locking/lockdep.c:4042 [inline] mark_lock.cold+0x1d/0x8e kernel/locking/lockdep.c:4479 mark_usage kernel/locking/lockdep.c:4380 [inline] __lock_acquire+0x121f/0x54c0 kernel/locking/lockdep.c:4855 lock_acquire kernel/locking/lockdep.c:5511 [inline] lock_acquire+0x19d/0x700 kernel/locking/lockdep.c:5476 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x58/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1012 [inline] kill_fasync fs/fcntl.c:1033 [inline] kill_fasync+0x14d/0x470 fs/fcntl.c:1026 evdev_hangup drivers/input/evdev.c:429 [inline] evdev_cleanup+0xb6/0x1a0 drivers/input/evdev.c:1324 evdev_disconnect+0x45/0xb0 drivers/input/evdev.c:1407 __input_unregister_device+0x206/0x470 drivers/input/input.c:2189 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2379 hidinput_disconnect+0x15e/0x3d0 drivers/hid/hid-input.c:2003 hid_disconnect+0x13f/0x1a0 drivers/hid/hid-core.c:2029 hid_hw_stop drivers/hid/hid-core.c:2076 [inline] hid_device_remove+0x186/0x240 drivers/hid/hid-core.c:2319 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 hid_remove_device drivers/hid/hid-core.c:2488 [inline] hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1161 device_release_driver_internal drivers/base/dd.c:1192 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1215 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x502/0xd40 drivers/base/core.c:3421 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x38c/0x460 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 usb 6-1: new high-speed USB device number 8 using dummy_hcd usb 6-1: Using ep0 maxpacket: 8 usb 6-1: config 0 interface 0 altsetting 0 has an invalid endpoint with address 0x0, skipping usb 6-1: New USB device found, idVendor=0421, idProduct=00b0, bcdDevice=8b.bb usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 6-1: Product: syz usb 6-1: Manufacturer: syz usb 6-1: SerialNumber: syz usb 6-1: config 0 descriptor?? usb 6-1: bad CDC descriptors usb 6-1: bad CDC descriptors cdc_acm 6-1:0.0: Zero length descriptor references cdc_acm: probe of 6-1:0.0 failed with error -22 usb 6-1: USB disconnect, device number 8 input: Generic X-Box pad as /devices/platform/dummy_hcd.3/usb4/4-1/4-1:0.65/input/input9 usb 6-1: new high-speed USB device number 9 using dummy_hcd usb 6-1: Using ep0 maxpacket: 8 usb 6-1: config 0 interface 0 altsetting 0 has an invalid endpoint with address 0x0, skipping usb 6-1: New USB device found, idVendor=0421, idProduct=00b0, bcdDevice=8b.bb usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 6-1: Product: syz usb 6-1: Manufacturer: syz usb 6-1: SerialNumber: syz usb 6-1: config 0 descriptor?? usb 6-1: bad CDC descriptors usb 6-1: bad CDC descriptors cdc_acm 6-1:0.0: Zero length descriptor references cdc_acm: probe of 6-1:0.0 failed with error -22 usb 6-1: USB disconnect, device number 9 usb 5-1: new full-speed USB device number 12 using dummy_hcd usb 5-1: New USB device found, idVendor=0df6, idProduct=004c, bcdDevice=48.5d usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=8 usb 5-1: SerialNumber: syz usb 5-1: config 0 descriptor?? r8712u: register rtl8712_netdev_ops to netdev_ops usb 5-1: r8712u: USB_SPEED_LOW with 0 endpoints usb 5-1: r8712u: Boot from EFUSE: Autoload Failed usb 5-1: r8712u: MAC Address from efuse = 00:e0:4c:87:00:00 usb 5-1: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin" usb 3-1: new high-speed USB device number 11 using dummy_hcd usb 3-1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7 usb 3-1: config 1 interface 1 altsetting 1 endpoint 0x82 has invalid wMaxPacketSize 0 usb 3-1: config 1 interface 1 altsetting 1 bulk endpoint 0x82 has invalid maxpacket 0 usb 3-1: config 1 interface 1 altsetting 1 endpoint 0x3 has invalid wMaxPacketSize 0 usb 3-1: config 1 interface 1 altsetting 1 bulk endpoint 0x3 has invalid maxpacket 0 usb 3-1: New USB device found, idVendor=0525, idProduct=a4a1, bcdDevice= 0.40 usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 3-1: Product: syz usb 3-1: Manufacturer: syz usb 3-1: SerialNumber: syz cdc_ncm 3-1:1.0: bind() failure cdc_ncm: probe of 3-1:1.1 failed with error -71 cdc_mbim: probe of 3-1:1.1 failed with error -71 usbtest: probe of 3-1:1.1 failed with error -71 usb 3-1: USB disconnect, device number 11