BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 in_atomic(): 1, irqs_disabled(): 0, pid: 5, name: kworker/0:0 7 locks held by kworker/0:0/5: #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:220 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:619 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline] #0: 000000007a8543c3 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x81a/0x1580 kernel/workqueue.c:2240 #1: 0000000048a474ad ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x84e/0x1580 kernel/workqueue.c:2244 #2: 00000000d0f0580f (&dev->mutex){....}, at: device_lock include/linux/device.h:1207 [inline] #2: 00000000d0f0580f (&dev->mutex){....}, at: hub_event+0x179/0x35a0 drivers/usb/core/hub.c:5378 #3: 0000000057b33a14 (&dev->mutex){....}, at: device_lock include/linux/device.h:1207 [inline] #3: 0000000057b33a14 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:821 #4: 00000000cbb72a73 (&dev->mutex){....}, at: device_lock include/linux/device.h:1207 [inline] #4: 00000000cbb72a73 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:821 #5: 00000000a77f1df0 (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1699 [inline] #5: 00000000a77f1df0 (console_lock){+.+.}, at: vprintk_emit+0x155/0x3a0 kernel/printk/printk.c:1974 #6: 00000000ae0b265e ((&toneport->timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:170 [inline] #6: 00000000ae0b265e ((&toneport->timer)){+.-.}, at: call_timer_fn+0xc9/0x5e0 kernel/time/timer.c:1315 CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.1.0-rc3+ #8 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+0xca/0x13e lib/dump_stack.c:113 ___might_sleep.cold+0x10f/0x129 kernel/sched/core.c:6190 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0xc8/0x12b0 kernel/locking/mutex.c:1072 line6_pcm_acquire+0x30/0x210 sound/usb/line6/pcm.c:311 call_timer_fn+0x15c/0x5e0 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers kernel/time/timer.c:1681 [inline] __run_timers kernel/time/timer.c:1649 [inline] run_timer_softirq+0x586/0x1400 kernel/time/timer.c:1694 __do_softirq+0x21f/0x8bc kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x17c/0x1a0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xf1/0x490 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:81 [inline] RIP: 0010:console_unlock+0x98e/0xb70 kernel/printk/printk.c:2460 Code: 00 89 ee 48 c7 c7 40 24 d3 86 e8 cd a4 03 00 65 ff 0d 06 79 da 7e e9 5e fa ff ff e8 0c 03 15 00 e8 c7 1b 1a 00 ff 74 24 30 9d 2d fe ff ff e8 f8 02 15 00 48 8b bc 24 80 00 00 00 c7 05 e6 48 RSP: 0018:ffff8881d9dc6be8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000200 RCX: 1ffff1103b3b0d24 RDX: 0000000000000000 RSI: ffff8881d9d86900 RDI: ffff8881d9d86834 RBP: 0000000000000000 R08: ffff8881d9d86000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000003d R13: ffffffff828a0a60 R14: 0000000000000001 R15: dffffc0000000000 vprintk_emit+0x16e/0x3a0 kernel/printk/printk.c:1975 dev_vprintk_emit+0x509/0x54e drivers/base/core.c:3185 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3196 __dev_printk+0x1e8/0x210 drivers/base/core.c:3208 _dev_err+0xd7/0x109 drivers/base/core.c:3251 dlfb_get_edid drivers/video/fbdev/udlfb.c:802 [inline] dlfb_setup_modes.cold+0x40/0x2e1 drivers/video/fbdev/udlfb.c:1256 dlfb_usb_probe.cold+0x967/0x16fd drivers/video/fbdev/udlfb.c:1658 usb_probe_interface+0x30d/0x7b0 drivers/usb/core/driver.c:361 really_probe+0x296/0x680 drivers/base/dd.c:509 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454 __device_attach+0x21e/0x360 drivers/base/dd.c:844 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514 device_add+0xaf4/0x1700 drivers/base/core.c:2106 usb_set_configuration+0xdf2/0x1670 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0xa8/0x110 drivers/usb/core/driver.c:266 really_probe+0x296/0x680 drivers/base/dd.c:509 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454 __device_attach+0x21e/0x360 drivers/base/dd.c:844 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514 device_add+0xaf4/0x1700 drivers/base/core.c:2106 usb_new_device.cold+0x8b8/0x1030 drivers/usb/core/hub.c:2534 hub_port_connect drivers/usb/core/hub.c:5089 [inline] hub_port_connect_change drivers/usb/core/hub.c:5204 [inline] port_event drivers/usb/core/hub.c:5350 [inline] hub_event+0x1ac9/0x35a0 drivers/usb/core/hub.c:5432 process_one_work+0x90a/0x1580 kernel/workqueue.c:2269 process_scheduled_works kernel/workqueue.c:2331 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2417 kthread+0x30e/0x420 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 ================================================================== BUG: KASAN: null-ptr-deref in memset include/linux/string.h:337 [inline] BUG: KASAN: null-ptr-deref in submit_audio_out_urb+0x919/0x1780 sound/usb/line6/playback.c:246 Write of size 20 at addr 0000000000000010 by task kworker/0:0/5 CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G W 5.1.0-rc3+ #8 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+0xca/0x13e lib/dump_stack.c:113 kasan_report.cold+0x5/0x35 mm/kasan/report.c:321 memset+0x20/0x40 mm/kasan/common.c:115 memset include/linux/string.h:337 [inline] submit_audio_out_urb+0x919/0x1780 sound/usb/line6/playback.c:246 line6_submit_audio_out_all_urbs+0xc9/0x120 sound/usb/line6/playback.c:295 line6_stream_start+0x156/0x1f0 sound/usb/line6/pcm.c:199 line6_pcm_acquire+0x134/0x210 sound/usb/line6/pcm.c:322 call_timer_fn+0x15c/0x5e0 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers kernel/time/timer.c:1681 [inline] __run_timers kernel/time/timer.c:1649 [inline] run_timer_softirq+0x586/0x1400 kernel/time/timer.c:1694 __do_softirq+0x21f/0x8bc kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x17c/0x1a0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xf1/0x490 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/irqflags.h:81 [inline] RIP: 0010:console_unlock+0x98e/0xb70 kernel/printk/printk.c:2460 Code: 00 89 ee 48 c7 c7 40 24 d3 86 e8 cd a4 03 00 65 ff 0d 06 79 da 7e e9 5e fa ff ff e8 0c 03 15 00 e8 c7 1b 1a 00 ff 74 24 30 9d 2d fe ff ff e8 f8 02 15 00 48 8b bc 24 80 00 00 00 c7 05 e6 48 RSP: 0018:ffff8881d9dc6be8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: 0000000000000200 RCX: 1ffff1103b3b0d24 RDX: 0000000000000000 RSI: ffff8881d9d86900 RDI: ffff8881d9d86834 RBP: 0000000000000000 R08: ffff8881d9d86000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000003d R13: ffffffff828a0a60 R14: 0000000000000001 R15: dffffc0000000000 vprintk_emit+0x16e/0x3a0 kernel/printk/printk.c:1975 dev_vprintk_emit+0x509/0x54e drivers/base/core.c:3185 dev_printk_emit+0xba/0xf1 drivers/base/core.c:3196 __dev_printk+0x1e8/0x210 drivers/base/core.c:3208 _dev_err+0xd7/0x109 drivers/base/core.c:3251 dlfb_get_edid drivers/video/fbdev/udlfb.c:802 [inline] dlfb_setup_modes.cold+0x40/0x2e1 drivers/video/fbdev/udlfb.c:1256 dlfb_usb_probe.cold+0x967/0x16fd drivers/video/fbdev/udlfb.c:1658 usb_probe_interface+0x30d/0x7b0 drivers/usb/core/driver.c:361 really_probe+0x296/0x680 drivers/base/dd.c:509 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454 __device_attach+0x21e/0x360 drivers/base/dd.c:844 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514 device_add+0xaf4/0x1700 drivers/base/core.c:2106 usb_set_configuration+0xdf2/0x1670 drivers/usb/core/message.c:2023 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210 usb_probe_device+0xa8/0x110 drivers/usb/core/driver.c:266 really_probe+0x296/0x680 drivers/base/dd.c:509 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454 __device_attach+0x21e/0x360 drivers/base/dd.c:844 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514 device_add+0xaf4/0x1700 drivers/base/core.c:2106 usb_new_device.cold+0x8b8/0x1030 drivers/usb/core/hub.c:2534 hub_port_connect drivers/usb/core/hub.c:5089 [inline] hub_port_connect_change drivers/usb/core/hub.c:5204 [inline] port_event drivers/usb/core/hub.c:5350 [inline] hub_event+0x1ac9/0x35a0 drivers/usb/core/hub.c:5432 process_one_work+0x90a/0x1580 kernel/workqueue.c:2269 process_scheduled_works kernel/workqueue.c:2331 [inline] worker_thread+0x7ab/0xe20 kernel/workqueue.c:2417 kthread+0x30e/0x420 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 ==================================================================