From: sashiko-bot@kernel.org
To: "Abhiraj Dutta" <abhirajdutta7@gmail.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
Date: Sun, 22 Nov 2026 22:12:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-228402@kernel.org> (raw)
In-Reply-To: <20261122-hp-spectre-16-f2-quirk-v1-1-2011ef8986fb@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ALSA: hda/realtek: duplicate LED registration and leak in
16-f2xxx fixup
--
commit 1e1f85383f6e0d271a8e66afdced2477c34a6570
Author: Abhiraj Dutta <abhirajdutta7@gmail.com>
ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
This commit adds a quirk entry and fixup for the HP Spectre x360 16-f2xxx
(SSID 103c:891e) to enable the treble speakers and configure the mute and
mic-mute LEDs.
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index d38be4d500b21..edfd5ebe8b084 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
[ ... ]
> @@ -7226,6 +7227,12 @@ static const struct hda_fixup alc269_fixups[] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx,
> },
> + [ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX] = {
> + .type = HDA_FIXUP_FUNC,
> + .v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
> + .chained = true,
> + .chain_id = ALC245_FIXUP_HP_X360_MUTE_LEDS
> + },
> [ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A] = {
> .type = HDA_FIXUP_FUNC,
> .v.func = alc245_fixup_hp_zbook_firefly_g12a,
[Severity: High]
Does chaining ALC245_FIXUP_HP_X360_MUTE_LEDS here register the mute and
mic-mute LED class devices twice?
alc245_fixup_hp_spectre_x360_eu0xxx() already runs both LED fixups directly:
sound/hda/codecs/realtek/alc269.c:alc245_fixup_hp_spectre_x360_eu0xxx() {
...
cs35l41_fixup_i2c_two(codec, fix, action);
alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
alc245_fixup_hp_gpio_led(codec, fix, action);
}
Chaining ALC245_FIXUP_HP_X360_MUTE_LEDS invokes
alc245_fixup_hp_mute_led_coefbit() and alc245_fixup_hp_gpio_led() a second
time. In create_mute_led_cdev(), the second registration allocates and
registers duplicate led_classdev instances and overwrites
spec->led_cdevs[LED_AUDIO_MUTE] and spec->led_cdevs[LED_AUDIO_MICMUTE], so
snd_hda_gen_spec_free() leaves the first devm-allocated led_classdev
structures registered in the LED core after they are freed on unbind
(use-after-free).
The 103c:891e quirk entry can use ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX
directly without adding ALC245_FIXUP_HP_SPECTRE_X360_16_F2XXX.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-hp-spectre-16-f2-quirk-v1-1-2011ef8986fb@gmail.com?part=1
next prev parent reply other threads:[~2026-11-22 22:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 22:02 [PATCH] ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx Abhiraj Dutta
2026-11-22 22:02 ` Abhiraj Dutta via B4 Relay
2026-11-22 22:12 ` sashiko-bot [this message]
2026-11-23 9:03 ` Takashi Iwai
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=sashiko-outbox-228402@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=abhirajdutta7@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.