From: Takashi Iwai <tiwai@suse.de>
To: raoxu <raoxu@uniontech.com>
Cc: perex@perex.cz, tiwai@suse.com, shenghao-ding@ti.com,
baojun.xu@ti.com, dakr@kernel.org, u.kleine-koenig@baylibre.com,
cassiogabrielcontato@gmail.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda/tas2781: fix ACPI reference handling
Date: Mon, 03 Aug 2026 08:58:25 +0200 [thread overview]
Message-ID: <87cxvzbsha.wl-tiwai@suse.de> (raw)
In-Reply-To: <97EA8F29DA0D9AF7+20260731033554.949564-1-raoxu@uniontech.com>
On Fri, 31 Jul 2026 05:35:54 +0200,
raoxu wrote:
>
> From: Xu Rao <raoxu@uniontech.com>
>
> tas2781_read_acpi() gets a reference to the matching ACPI device and then
> looks up its first physical device node. After taking a reference to the
> physical device, it immediately drops the ACPI device reference.
>
> However, every later failure jumps to an error path that drops the ACPI
> device reference a second time. This unbalances the reference count and
> may prematurely release the ACPI device.
>
> In addition, acpi_get_first_physical_node() may return NULL. Without a
> check, the driver passes the NULL physical device to the property helper
> calls and may dereference it.
>
> Return -ENODEV when no physical device is associated with the ACPI node,
> and remove the duplicate acpi_dev_put() from the common error path.
>
> Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-08-03 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 3:35 [PATCH] ALSA: hda/tas2781: fix ACPI reference handling raoxu
2026-08-03 6:58 ` 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=87cxvzbsha.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=baojun.xu@ti.com \
--cc=cassiogabrielcontato@gmail.com \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=raoxu@uniontech.com \
--cc=shenghao-ding@ti.com \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.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