All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	stable@vger.kernel.org, Jianhao Xu <jianhao.xu@seu.edu.cn>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: usb-audio: Protect Roland control activation
Date: Tue, 29 Sep 2026 16:27:10 +0200	[thread overview]
Message-ID: <87y0ckyvy9.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260929141726.2166899-1-runyu.xiao@seu.edu.cn>

On Tue, 29 Sep 2026 16:17:26 +0200,
Runyu Xiao wrote:
> 
> The USB MIDI driver changes the Roland MIDI Input Mode control's access
> flags directly from the rawmidi open and close paths.  These changes are
> not protected by the ALSA control core and the corresponding notifications
> can race with control access.
> 
> Use snd_ctl_activate_id() so that the control core updates the access flags
> and sends the notification under its lock.  Release the USB MIDI mutex
> before calling it because the control write path holds controls_rwsem while
> roland_load_put() takes the USB MIDI mutex.
> 
> Keep the state transition and alternate-setting change under the USB MIDI
> mutex; rawmidi's open mutex serializes the enclosing open and close paths.
> 
> Fixes: 96f61d9ade82 ("sound: usb-audio: allow switching altsetting on Roland USB MIDI devices")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>

Applied to for-next branch.  Thanks.


Takashi

      reply	other threads:[~2026-09-29 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  7:40 [PATCH] ALSA: usb-audio: Protect Roland control activation Runyu Xiao
2026-09-29 13:34 ` Takashi Iwai
2026-09-29 14:17   ` [PATCH v2] " Runyu Xiao
2026-09-29 14:27     ` Takashi Iwai [this message]

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=87y0ckyvy9.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=clemens@ladisch.de \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=runyu.xiao@seu.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.