* [PATCH v2] ALSA: hpi: Check transport errors during HPI6000 adapter initialization
@ 2026-07-08 14:11 Evgenii Burenchev
2026-07-13 10:02 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Evgenii Burenchev @ 2026-07-08 14:11 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman
Cc: Evgenii Burenchev, perex, tiwai, kees, eblennerhassett,
linux-sound, linux-kernel, lvc-project
create_adapter_obj() retrieves adapter information by calling
hpi6000_message_response_sequence(). This function reports transport-level
errors through its return value and DSP-reported errors via hr0.error.
The current code only checks hr0.error, causing transport-level errors to
be ignored. As a result, adapter initialization may continue with an
invalid response.
Check the return value of hpi6000_message_response_sequence() before
examining hr0.error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards")
Signed-off-by: Evgenii Burenchev <evg28bur@yandex.ru>
---
Changes in v2:
- Fix the Fixes tag to point to the commit that originally added the code
(suggested by Takashi Iwai)
---
sound/pci/asihpi/hpi6000.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/pci/asihpi/hpi6000.c b/sound/pci/asihpi/hpi6000.c
index c8d1518ee3e7..fd7fe9dba0b8 100644
--- a/sound/pci/asihpi/hpi6000.c
+++ b/sound/pci/asihpi/hpi6000.c
@@ -537,6 +537,11 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
hr1.size = sizeof(hr1);
error = hpi6000_message_response_sequence(pao, 0, &hm, &hr0);
+ if (error) {
+ HPI_DEBUG_LOG(ERROR, "message transport error %d\n",
+ error);
+ return error;
+ }
if (hr0.error) {
HPI_DEBUG_LOG(DEBUG, "message error %d\n", hr0.error);
return hr0.error;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] ALSA: hpi: Check transport errors during HPI6000 adapter initialization
2026-07-08 14:11 [PATCH v2] ALSA: hpi: Check transport errors during HPI6000 adapter initialization Evgenii Burenchev
@ 2026-07-13 10:02 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-07-13 10:02 UTC (permalink / raw)
To: Evgenii Burenchev
Cc: stable, Greg Kroah-Hartman, perex, tiwai, kees, eblennerhassett,
linux-sound, linux-kernel, lvc-project
On Wed, 08 Jul 2026 16:11:44 +0200,
Evgenii Burenchev wrote:
>
> create_adapter_obj() retrieves adapter information by calling
> hpi6000_message_response_sequence(). This function reports transport-level
> errors through its return value and DSP-reported errors via hr0.error.
>
> The current code only checks hr0.error, causing transport-level errors to
> be ignored. As a result, adapter initialization may continue with an
> invalid response.
>
> Check the return value of hpi6000_message_response_sequence() before
> examining hr0.error.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards")
> Signed-off-by: Evgenii Burenchev <evg28bur@yandex.ru>
Applied to for-next branch. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-13 10:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 14:11 [PATCH v2] ALSA: hpi: Check transport errors during HPI6000 adapter initialization Evgenii Burenchev
2026-07-13 10:02 ` Takashi Iwai
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.