From: Takashi Iwai <tiwai@suse.de>
To: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Cc: perex@perex.cz, tiwai@suse.de, linux-kernel@vger.kernel.org,
linux-sound@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: jack: Fix jack control cleanup on error paths
Date: Mon, 16 Nov 2026 16:46:01 +0100 [thread overview]
Message-ID: <8733t0ye2u.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261115114315.3679-1-sreekuttan2156239@gmail.com>
On Sun, 15 Nov 2026 12:43:15 +0100,
Sreeraj S Kurup wrote:
>
> snd_jack_new() creates an ALSA jack control before allocating
> the jack structure.
>
> If a later allocation or device registration fails, the
> function returns without removing the previously created
> control. This leaves the control attached to the sound card
> and can cause invalid list operations during card teardown.
>
> Initialize the control list in snd_jack_kctl_new() so that
> the private_free callback can safely remove the list entry.
>
> Route all failure paths in snd_jack_new() through common
> cleanup labels to remove the control and free allocated
> resources.
>
> Fixes: 4e3f0dc65883 ("ALSA: jack: extend snd_jack_new to support phantom jack")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
Applied to for-next branch now, as it's no urgent fix that can trigger
a crash or such.
thanks,
Takashi
next prev parent reply other threads:[~2026-11-16 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 10:19 [PATCH] ALSA: jack: Fix control leak on jack allocation failure Sreeraj S Kurup
2026-11-15 10:30 ` sashiko-bot
2026-11-15 11:43 ` [PATCH v2] ALSA: jack: Fix jack control cleanup on error paths Sreeraj S Kurup
2026-11-16 15:46 ` Takashi Iwai [this message]
2026-11-16 16:16 ` Sreeraj S Kurup
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=8733t0ye2u.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sreekuttan2156239@gmail.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.