* Patch "ALSA: hda: Abort capability probe at invalid register read" has been added to the 4.9-stable tree
@ 2017-10-24 8:02 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-24 8:02 UTC (permalink / raw)
To: tiwai, gregkh, vinod.koul; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ALSA: hda: Abort capability probe at invalid register read
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-hda-abort-capability-probe-at-invalid-register-read.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 098a0a62c1554f5a3813ef1b8539563214ada8f6 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 17 Oct 2017 16:38:55 +0200
Subject: ALSA: hda: Abort capability probe at invalid register read
From: Takashi Iwai <tiwai@suse.de>
commit 098a0a62c1554f5a3813ef1b8539563214ada8f6 upstream.
The loop in snd_hdac_bus_parse_capabilities() may go to nirvana when
it hits an invalid register value read:
BUG: unable to handle kernel paging request at ffffad5dc41f3fff
IP: pci_azx_readl+0x5/0x10 [snd_hda_intel]
Call Trace:
snd_hdac_bus_parse_capabilities+0x3c/0x1f0 [snd_hda_core]
azx_probe_continue+0x7d5/0x940 [snd_hda_intel]
.....
This happened on a new Intel machine, and we need to check the value
and abort the loop accordingly.
[Note: the fixes tag below indicates only the commit where this patch
can be applied; the original problem was introduced even before that
commit]
Fixes: 6720b38420a0 ("ALSA: hda - move bus_parse_capabilities to core")
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/hda/hdac_controller.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -284,6 +284,11 @@ int snd_hdac_bus_parse_capabilities(stru
dev_dbg(bus->dev, "HDA capability ID: 0x%x\n",
(cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF);
+ if (cur_cap == -1) {
+ dev_dbg(bus->dev, "Invalid capability reg read\n");
+ 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");
Patches currently in stable-queue which might be from tiwai@suse.de are
queue-4.9/alsa-hda-remove-superfluous-added-by-printk-conversion.patch
queue-4.9/alsa-hda-abort-capability-probe-at-invalid-register-read.patch
queue-4.9/alsa-usb-audio-add-native-dsd-support-for-pro-ject-pre-box-s2-digital.patch
queue-4.9/alsa-seq-enable-use-locking-in-all-configurations.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-24 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 8:02 Patch "ALSA: hda: Abort capability probe at invalid register read" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).