Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH v2] ALSA: es18xx: check control allocation before private data setup
Date: Sun, 07 Jun 2026 11:45:28 +0200	[thread overview]
Message-ID: <87a4t6smyv.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260607074219.3-1-ruoyuw560@gmail.com>

On Sun, 07 Jun 2026 09:42:19 +0200,
Ruoyu Wang wrote:
> 
> snd_es18xx_mixer() creates controls with snd_ctl_new1() and then stores
> bookkeeping pointers or sets private_free before calling snd_ctl_add().
> snd_ctl_new1() can return NULL on allocation failure, so those writes
> can dereference a NULL control pointer.
> 
> Check the returned control pointers before using them and return -ENOMEM
> on allocation failure.
> 
> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
> ---
> v2:
> - Rebase on sound.git for-next.
> - Resend only es18xx; the other v1 patches are already in for-next.

Applied to for-next branch now.  Thanks.


Takashi

      reply	other threads:[~2026-06-07  9:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07  7:42 [PATCH v2] ALSA: es18xx: check control allocation before private data setup Ruoyu Wang
2026-06-07  9:45 ` 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=87a4t6smyv.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=ruoyuw560@gmail.com \
    --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