* [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
@ 2017-10-18 23:45 Ughreja, Rakesh A
2017-10-18 16:26 ` Vinod Koul
0 siblings, 1 reply; 4+ messages in thread
From: Ughreja, Rakesh A @ 2017-10-18 23:45 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, vinod.koul, Rakesh Ughreja
From: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Due to bugs in BIOS it's possible that the HDA capability link
list is not constructed properly. This may lead to driver going
into unknown state. 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] 4+ messages in thread
* Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
2017-10-18 23:45 [PATCH v2] ALSA: hda: Abort capability probe on invalid capability Ughreja, Rakesh A
@ 2017-10-18 16:26 ` Vinod Koul
2017-10-18 16:52 ` Ughreja, Rakesh A
0 siblings, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2017-10-18 16:26 UTC (permalink / raw)
To: Ughreja, Rakesh A; +Cc: tiwai, alsa-devel
On Thu, Oct 19, 2017 at 05:15:25AM +0530, Ughreja, Rakesh A wrote:
> From: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
>
> Due to bugs in BIOS it's possible that the HDA capability link
It maybe due to BIOS bug or some other issue, lets not quantify that please.
I would say "On reading wrong capablity pointer values we may crash...
> list is not constructed properly. This may lead to driver going
> into unknown state.
I dont think we maintain driver states which are going wrong here
> So whenever driver discovers unknown HDA
> capability, log it as error and stop traversing the link list
> further.
that sound good
>
> 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] 4+ messages in thread
* Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
2017-10-18 16:26 ` Vinod Koul
@ 2017-10-18 16:52 ` Ughreja, Rakesh A
2017-10-19 7:15 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Ughreja, Rakesh A @ 2017-10-18 16:52 UTC (permalink / raw)
To: Koul, Vinod; +Cc: tiwai@suse.de, alsa-devel@alsa-project.org
>-----Original Message-----
>From: Koul, Vinod
>Sent: Wednesday, October 18, 2017 9:57 PM
>To: Ughreja, Rakesh A <rakesh.a.ughreja@intel.com>
>Cc: alsa-devel@alsa-project.org; tiwai@suse.de
>Subject: Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
>
>On Thu, Oct 19, 2017 at 05:15:25AM +0530, Ughreja, Rakesh A wrote:
>> From: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
>>
>> Due to bugs in BIOS it's possible that the HDA capability link
>
>It maybe due to BIOS bug or some other issue, lets not quantify that please.
>
>I would say "On reading wrong capablity pointer values we may crash...
>
>> list is not constructed properly. This may lead to driver going
>> into unknown state.
>
>I dont think we maintain driver states which are going wrong here
>
>> So whenever driver discovers unknown HDA
>> capability, log it as error and stop traversing the link list
>> further.
>
>that sound good
Hi Vinod, Takashi,
Are you both ok with following commit message ?
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.
Regards,
Rakesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
2017-10-18 16:52 ` Ughreja, Rakesh A
@ 2017-10-19 7:15 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-10-19 7:15 UTC (permalink / raw)
To: Ughreja, Rakesh A; +Cc: Koul, Vinod, alsa-devel@alsa-project.org
On Wed, 18 Oct 2017 18:52:54 +0200,
Ughreja, Rakesh A wrote:
>
>
>
> >-----Original Message-----
> >From: Koul, Vinod
> >Sent: Wednesday, October 18, 2017 9:57 PM
> >To: Ughreja, Rakesh A <rakesh.a.ughreja@intel.com>
> >Cc: alsa-devel@alsa-project.org; tiwai@suse.de
> >Subject: Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
> >
> >On Thu, Oct 19, 2017 at 05:15:25AM +0530, Ughreja, Rakesh A wrote:
> >> From: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
> >>
> >> Due to bugs in BIOS it's possible that the HDA capability link
> >
> >It maybe due to BIOS bug or some other issue, lets not quantify that please.
> >
> >I would say "On reading wrong capablity pointer values we may crash...
> >
> >> list is not constructed properly. This may lead to driver going
> >> into unknown state.
> >
> >I dont think we maintain driver states which are going wrong here
> >
> >> So whenever driver discovers unknown HDA
> >> capability, log it as error and stop traversing the link list
> >> further.
> >
> >that sound good
>
> Hi Vinod, Takashi,
>
> Are you both ok with following commit message ?
>
> 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.
Looks good to me.
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-19 7:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 23:45 [PATCH v2] ALSA: hda: Abort capability probe on invalid capability Ughreja, Rakesh A
2017-10-18 16:26 ` Vinod Koul
2017-10-18 16:52 ` Ughreja, Rakesh A
2017-10-19 7:15 ` Takashi Iwai
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).