On Fri, Feb 07, 2025 at 01:34:41PM -0700, Jill Donahue wrote: > When using USB MIDI, a lock is attempted to be acquired twice through a > re-entrant call to f_midi_transmit, causing a deadlock. > > Fix it by using tasklet_hi_schedule() to schedule the inner > f_midi_transmit() via a tasklet from the completion handler. > > Link: https://lore.kernel.org/all/CAArt=LjxU0fUZOj06X+5tkeGT+6RbXzpWg1h4t4Fwa_KGVAX6g@xxxxxxxxxxxxxx/ > Fixes: d5daf49b58661 ("USB: gadget: midi: add midi function driver") > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Jill Donahue <jilliandonahue58@xxxxxxxxx> > --- > drivers/usb/gadget/function/f_midi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c > index 837fcdfa3840..37d438e5d451 100644 > --- a/drivers/usb/gadget/function/f_midi.c > +++ b/drivers/usb/gadget/function/f_midi.c > @@ -283,7 +283,7 @@ f_midi_complete(struct usb_ep *ep, struct usb_request *req) > /* Our transmit completed. See if there's more to go. > * f_midi_transmit eats req, don't queue it again. */ > req->length = 0; > - f_midi_transmit(midi); > + tasklet_hi_schedule(&midi->tasklet); > return; > } > break; > -- > 2.25.1 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot