Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	notify@kernel.org
Subject: Re: [PATCH] ALSA: pcm: Fix unlocked state reads in read/write file ops
Date: Wed, 10 Jun 2026 16:56:19 +0200	[thread overview]
Message-ID: <87wlw64f70.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260610-alsa-pcm-read-write-state-helper-v1-1-93b7b992db09@gmail.com>

On Wed, 10 Jun 2026 13:31:30 +0200,
Cássio Gabriel wrote:
> 
> The PCM read/write and readv/writev file operations reject streams in
> OPEN or DISCONNECTED state before accessing the configured runtime
> parameters. However, each operation reads runtime->state without the
> PCM stream lock.
> 
> PCM state updates are serialized by the stream lock and may occur
> concurrently from IRQ context. Use a local predicate based on
> snd_pcm_get_state() to take a locked state snapshot for these VFS entry
> checks.
> 
> This also consolidates the duplicated OPEN and DISCONNECTED tests. The
> conditions and returned errors remain unchanged.
> 
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>

Applied to for-next branch now.  Thanks.


Takashi

      reply	other threads:[~2026-06-10 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 11:31 [PATCH] ALSA: pcm: Fix unlocked state reads in read/write file ops Cássio Gabriel
2026-06-10 14:56 ` 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=87wlw64f70.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=cassiogabrielcontato@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=notify@kernel.org \
    --cc=perex@perex.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox