Spinlock in f_midi_transmit causing kernel crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am working on getting USB MIDI enabled for my device and keep
running into this issue:

[  125.702601] kernel BUG at /kernel-source//kernel/locking/rtmutex.c:1048!
[  125.702607] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP

[  125.702764] Call trace:
[  125.702770]  rt_spin_lock_slowlock_locked+0x280/0x2b8
[  125.702774]  rt_spin_lock_slowlock+0x5c/0x90
[  125.702779]  rt_spin_lock+0x60/0x70
[  125.702792]  f_midi_transmit+0x90/0x5d8 [usb_f_midi]
[  125.702797]  f_midi_complete+0x11c/0x138 [usb_f_midi]
[  125.702809]  usb_gadget_giveback_request+0x10/0x18
[  125.702814]  __usbhsg_queue_pop+0x3c/0x58
[  125.702818]  usbhsg_queue_done+0x44/0x60
[  125.702822]  usbhsf_pkt_handler+0x80/0x120
[  125.702826]  usbhs_pkt_start+0x10/0x18
[  125.702830]  usbhsg_queue_push.isra.0+0x44/0x50
[  125.702834]  usbhsg_ep_queue+0x2c/0x40
[  125.702837]  usb_ep_queue+0x24/0x40
[  125.702843]  f_midi_transmit+0x238/0x5d8 [usb_f_midi]
[  125.702848]  f_midi_in_tasklet+0xc/0x18 [usb_f_midi]
[  125.702860]  tasklet_action_common.isra.2+0xcc/0x1f0
[  125.702864]  tasklet_hi_action+0x20/0x28
[  125.702869]  do_current_softirqs+0x19c/0x248
[  125.702873]  run_ksoftirqd+0x24/0x40
[  125.702883]  smpboot_thread_fn+0x1b0/0x2b8
[  125.702887]  kthread+0x16c/0x170
[  125.702894]  ret_from_fork+0x10/0x1c
[  125.702900] Code: a90363b7 f9000fb4 f90023b9 f9002bbb (d4210000)
[  125.966631] ---[ end trace 0000000000000002 ]---

Seen in the driver code here:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/usb/gadget/function/f_midi.c?h=v4.19.182#n683

We are running a 4.19.182 kernel patched to PREEMPT RT.

Has anyone come across this before?
I also ask if we've uncovered a bug when using the midi usb gadget
with PREEMPT RT.
If so, do you have any suggestions for a proper fix?

Thanks for your help,
~Jill Donahue




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux