* [PATCH v3] ALSA: hda: Abort capability probe on invalid capability
@ 2017-10-24 12:56 Rakesh Ughreja
2017-10-24 5:20 ` Vinod Koul
2017-10-24 6:16 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Rakesh Ughreja @ 2017-10-24 12:56 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, vinod.koul, Rakesh Ughreja
On reading wrong capability pointer values driver may crash, so whenever
driver discovers unknown HDA capability, log it as error and stop traversing
the link list further.
Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
---
sound/hda/hdac_controller.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
index 978dc18..8f7d0d9 100644
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -314,7 +314,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus)
break;
default:
- dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap);
+ dev_err(bus->dev, "Unknown capability %d\n", cur_cap);
+ cur_cap = 0;
break;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] ALSA: hda: Abort capability probe on invalid capability
2017-10-24 12:56 [PATCH v3] ALSA: hda: Abort capability probe on invalid capability Rakesh Ughreja
@ 2017-10-24 5:20 ` Vinod Koul
2017-10-24 6:16 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2017-10-24 5:20 UTC (permalink / raw)
To: Rakesh Ughreja; +Cc: tiwai, alsa-devel
On Tue, Oct 24, 2017 at 06:26:47PM +0530, Rakesh Ughreja wrote:
> On reading wrong capability pointer values driver may crash, so whenever
> driver discovers unknown HDA capability, log it as error and stop traversing
> the link list further.
Acked-By: Vinod Koul <vinod.koul@intel.com>
> Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
> ---
> sound/hda/hdac_controller.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
> index 978dc18..8f7d0d9 100644
> --- a/sound/hda/hdac_controller.c
> +++ b/sound/hda/hdac_controller.c
> @@ -314,7 +314,8 @@ int snd_hdac_bus_parse_capabilities(struct hdac_bus *bus)
> break;
>
> default:
> - dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap);
> + dev_err(bus->dev, "Unknown capability %d\n", cur_cap);
> + cur_cap = 0;
> break;
> }
>
> --
> 2.7.4
>
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] ALSA: hda: Abort capability probe on invalid capability
2017-10-24 12:56 [PATCH v3] ALSA: hda: Abort capability probe on invalid capability Rakesh Ughreja
2017-10-24 5:20 ` Vinod Koul
@ 2017-10-24 6:16 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-10-24 6:16 UTC (permalink / raw)
To: Rakesh Ughreja; +Cc: vinod.koul, alsa-devel
On Tue, 24 Oct 2017 14:56:47 +0200,
Rakesh Ughreja wrote:
>
> On reading wrong capability pointer values driver may crash, so whenever
> driver discovers unknown HDA capability, log it as error and stop traversing
> the link list further.
>
> Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-24 6:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 12:56 [PATCH v3] ALSA: hda: Abort capability probe on invalid capability Rakesh Ughreja
2017-10-24 5:20 ` Vinod Koul
2017-10-24 6:16 ` 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.