From: Takashi Iwai <tiwai@suse.de>
To: Ye Weihua <yeweihua4@huawei.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
<linux-sound@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH -next 1/2] ALSA: pcm: oss: Restore params flag after failed reconfiguration
Date: Mon, 16 Nov 2026 16:31:41 +0100 [thread overview]
Message-ID: <878q2syeqq.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261116064850.3540576-1-yeweihua4@huawei.com>
On Mon, 16 Nov 2026 07:48:49 +0100,
Ye Weihua wrote:
>
> snd_pcm_runtime_buffer_set_silence() may fail with -EBUSY when a
> concurrent PCM transfer is accessing the buffer. The error path
> releases runtime->oss.buffer and clears the plugins, but leaves
> runtime->oss.params cleared as well. A subsequent small read/write
> then skips the reconfiguration and dereferences the released buffer:
>
> Unable to handle kernel NULL pointer dereference at virtual address
> 0000000000000000
> pc : __arch_copy_from_user+0x78/0x23c
> lr : snd_pcm_oss_write+0x10c/0x340 [snd_pcm_oss]
>
> Restore runtime->oss.params on the error path so that the next OSS
> operation reconfigures and reallocates the buffer.
>
> Fixes: 47c27c9c9c72 ("ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ye Weihua <yeweihua4@huawei.com>
Applied both patches now. Thanks.
Takashi
prev parent reply other threads:[~2026-11-16 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 6:48 [PATCH -next 1/2] ALSA: pcm: oss: Restore params flag after failed reconfiguration Ye Weihua
2026-11-16 6:48 ` [PATCH -next 2/2] ALSA: pcm: oss: Clear params flag only after successful setup Ye Weihua
2026-11-16 15:31 ` 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=878q2syeqq.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=yeweihua4@huawei.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