From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384483; b=xol6OgdC1jzAKL6SCwcZao6O2ENcrmkBsjbgSkG+35EJgRjyZ9mGEbNTSjYezz4zjEME pcevVfOePXqVIFpsImPKwrxe6tfyIhbBaLQH4uUjZL67XddHAqnO6GdiKsKezo5aIUC2V V+58kMQqKvBeXEn7LsJw7HlVSNCNx/ANOebcIoh1Y25VNlLSUZGOSZN+nY8dYyDT6MURS 4ovzBUH9uEaDNM/qq+MjpPIh9vZ/NHFQjVKIQcDDBEiuytxmifkFAZVQ0ES6bvxkpvAFt jKVeOvd015+Ke2RN56YXfZIFkZwuay4JR+QxdRXj01XcY+QdZLQEDnxSatUoqb7SJdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384483; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=O/EAUvRIyKMCsGb3DkRMkl+ccNjLTaXlwxZ/Yo8JtZw=; b=WDJlqnqk4QfpfypdoHJksLVXDKjobfUZV/yT1IOhLxCVQKVvWF32gjGOWuO2nhuv6N/A Fh08k+hyYMMltFtSysB05N9gBqHQXysCvO+tkoazEjf7zgYVZsRMZErSTxhOJbyBAV1pu 3nF5JFd9xImTOHtyT0x8mArH5TCpP+zz/pf4XDKjMDUtiauuTt4zJV3PtYnJ1O8/uEsiN T1IMv6b7ZaYB/ps7eva4KY2q5nyTZdquUhWqzyRoDUCzab2qgaf8TBoLDmNk+cYA3zVkm 1c3hCIK8GgbP/uYRorWBe4njuG6LzZUcMSS4BMbJGy7sKSvnWfOAHmqGlN7mphu+E5g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=yuoeWOBu; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26A8E606A32D; Fri, 4 Dec 2026 11:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=yuoeWOBu Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91DE61F000CE; Fri, 4 Dec 2026 11:41:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384483; bh=O/EAUvRIyKMCsGb3DkRMkl+ccNjLTaXlwxZ/Yo8JtZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yuoeWOBuS/govQwKcc3j4NfRABOxZ9g9iaBziLtKQ2IeJtfEoxFfhLQnL8vrCd7AT TtbuAAzXBghFhRq6pK5Qrx1/RbGxKcdV4Q6nSIZQEo+KxreM3m5P+cxeHnPtEz9NeP mF7217pFK7Yd0AY+1hVJ/12tL5A5bU/uecs867ik= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= , Takashi Iwai , Sasha Levin Subject: [PATCH 6.6 0169/1167] ALSA: hda/core: Stop capability walk on empty capability header Date: Fri, 4 Dec 2026 18:53:16 +0900 Message-ID: <20261204100706.480114831@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michał Kopeć [ Upstream commit f65c917397c77daeb7e6d0893ebe89107ddd5692 ] snd_hdac_bus_parse_capabilities() walks the controller's linked capability list starting at LLCH. On some platforms one of the entries reads back as all zeros. Such a header does not describe a capability, but the walk still treats it as one: it falls into the default case and reports an error, printing the raw register value instead of the capability ID: snd_hda_intel 0000:00:1f.3: Unknown capability 0 The walk then stops anyway, because the next pointer of a zero header is 0, so the message is only noise. Treat an all-zero header as the end of the list, the same way a failed read (-1) is already handled, and log it at debug level only. Also print the capability ID in hex for a genuinely unknown capability, instead of the full header value. Fixes: 0b00a5615dc4 ("ALSA: hdac_ext: add hdac extended controller") Signed-off-by: Michał Kopeć Link: https://patch.msgid.link/20261102114939.2182131-1-michal.kopec@3mdeb.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/hda/hdac_controller.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c index 7f3a000fab0ce..fdea6d2102e1e 100644 --- a/sound/hda/hdac_controller.c +++ b/sound/hda/hdac_controller.c @@ -325,6 +325,13 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) break; } + /* An all-zero header means no capability is present here */ + if (!cur_cap) { + dev_dbg(bus->dev, "Empty capability header at offset 0x%x\n", + offset); + break; + } + switch ((cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF) { case AZX_ML_CAP_ID: dev_dbg(bus->dev, "Found ML capability\n"); @@ -355,7 +362,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus) break; default: - dev_err(bus->dev, "Unknown capability %d\n", cur_cap); + dev_err(bus->dev, "Unknown capability ID 0x%x\n", + (cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF); cur_cap = 0; break; } -- 2.53.0