All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Cc: Hu Jiahui <kirin.say@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] ALSA: pcm: Fix ioctl races
Date: Tue, 22 Mar 2022 18:14:35 +0100	[thread overview]
Message-ID: <53e52d32-dd17-7aa6-2ad0-432a5cf4cf35@perex.cz> (raw)
In-Reply-To: <20220322170720.3529-1-tiwai@suse.de>

On 22. 03. 22 18:07, Takashi Iwai wrote:
> Hi,
> 
> this is a patch set to address the recently reported bug for the racy
> PCM ioctls.  In short, the current ALSA PCM core doesn't take enough
> care of concurrent ioctl calls, and the concurrent calls may result in
> a use-after-free.  The reported problem was the concurrent hw_free
> calls, but there can be similar cases with other code paths like
> hw_params, prepare, etc, too.
> 
> The patch set introduces the new runtime->buffer_mutex for protecting
> those.  The first patch is the fix for the reported issue (the races
> with hw_free), while the rest three are more hardening for the other
> similar executions.

Thank you Takashi.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

      parent reply	other threads:[~2022-03-22 17:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 17:07 [PATCH 0/4] ALSA: pcm: Fix ioctl races Takashi Iwai
2022-03-22 17:07 ` [PATCH 1/4] ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Takashi Iwai
2022-03-22 17:07 ` [PATCH 2/4] ALSA: pcm: Fix races among concurrent read/write and buffer changes Takashi Iwai
2022-03-22 17:07 ` [PATCH 3/4] ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls Takashi Iwai
2022-03-23  8:08   ` Amadeusz Sławiński
2022-03-23  8:15     ` Takashi Iwai
2022-03-23  8:22       ` Takashi Iwai
2022-03-22 17:07 ` [PATCH 4/4] ALSA: pcm: Fix races among concurrent prealloc proc writes Takashi Iwai
2022-03-22 17:14 ` Jaroslav Kysela [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=53e52d32-dd17-7aa6-2ad0-432a5cf4cf35@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=kirin.say@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@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 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.