From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Jillian Donahue <jilliandonahue58@gmail.com>
Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
"Petr Tesařík" <petesarik@suse.de>,
linux-rt-users@vger.kernel.org
Subject: Re: Spinlock in f_midi_transmit causing kernel crash
Date: Thu, 6 Feb 2025 13:05:25 +0100 [thread overview]
Message-ID: <20250206120525.3yeIJrEw@linutronix.de> (raw)
In-Reply-To: <CAArt=Lgo=mXXoFLZx1b0pGruiP2r9g-dmTnfEGzX5N6=+3cmcQ@mail.gmail.com>
On 2025-02-03 10:50:57 [-0700], Jillian Donahue wrote:
> From a97fceb3e51c478dee6d63caafb92c867432c042 Mon Sep 17 00:00:00 2001
> From: Jill Donahue <jilliandonahue58@gmail.com>
> 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@mail.gmail.com/
>
> 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
next prev parent reply other threads:[~2025-02-06 12:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 4:05 Spinlock in f_midi_transmit causing kernel crash Jillian Donahue
2025-01-23 13:23 ` Petr Tesařík
2025-01-24 22:21 ` Jillian Donahue
2025-01-29 10:39 ` Sebastian Andrzej Siewior
2025-01-29 21:59 ` Jillian Donahue
2025-01-30 7:50 ` Sebastian Andrzej Siewior
2025-01-31 19:08 ` Jillian Donahue
2025-02-03 12:45 ` Luis Claudio R. Goncalves
2025-02-03 13:22 ` Sebastian Andrzej Siewior
2025-02-03 17:50 ` Jillian Donahue
2025-02-06 12:05 ` Sebastian Andrzej Siewior [this message]
2025-02-06 18:13 ` Jillian Donahue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250206120525.3yeIJrEw@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=jilliandonahue58@gmail.com \
--cc=lgoncalv@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=petesarik@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox