Re: Spinlock in f_midi_transmit causing kernel crash

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

 



On 2025-02-03 10:50:57 [-0700], Jillian Donahue wrote:
> From a97fceb3e51c478dee6d63caafb92c867432c042 Mon Sep 17 00:00:00 2001
> From: Jill Donahue <jilliandonahue58@xxxxxxxxx>
> Date: Mon, 3 Feb 2025 10:46:31 -0700
> Subject: [PATCH] f_midi_complete to call tasklet_hi_schedule
> 
> When using USB MIDI, a spinlock is hit causing a kernel oops. This

It is not an oops, it is a deadlock and in general a lock-up. On
PREEMPT_RT you see this backtrace. Non-RT with lockdep should report
something. I would stay with deadlock.

> happens because a lock is attempted to be acquired twice through
> f_midi_transmit. The fix lies in calling tasklet_hi_schedule() in
> f_midi_complete to remove the repeated call to f_midi_transmit.

s/The.*

Use tasklet_hi_schedule() to schedule 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")

Way better. Please run it via ./scripts/check_patch.pl. It will tell you
that you need a sign-of-by line. Please check what it means and if you
agree with it.

Please run it via scripts/get_maintainer.pl and send it to that list.

Thank you.

Sebastian




[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