ALSA: hda: Abort capability probe on invalid capability
PATCH v2 1/1 ALSA: hda: Abort capability probe on invalid capability
From: Rakesh Ughreja <[email protected]>
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.
--- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/hda/hdac_controller.c +2 -1
@@ -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 ; }
Signature · 1 line
2.7.4
Quoted 3 lines · Rakesh A
From: Rakesh Ughreja <[email protected]>
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...
Quoted 2 lines
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
Quoted 3 lines
So whenever driver discovers unknown HDA capability, log it as error and stop traversing the link list further.
that sound good
Quoted 23 lines
Signed-off-by Rakesh Ughreja <[email protected]>--- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/hda/hdac_controller.c +2
-1@@ -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 ; }Signature · 1 line
2.7.4
Signature · 1 line
~Vinod
Quoted 21 lines
-----Original Message-----
From: Koul, Vinod
Sent: Wednesday, October 18, 2017 9:57 PM
To: Ughreja, Rakesh A <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capabilityQuoted 3 lines · Rakesh A
From: Rakesh Ughreja <[email protected]>
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...
Quoted 2 lines
list is not constructed properly. This may lead to driver going into unknown state.
Quoted 7 lines
I dont think we maintain driver states which are going wrong here
Quoted 3 lines
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
Quoted 30 lines · Rakesh A
Quoted 22 lines
-----Original Message-----
From: Koul, Vinod
Sent: Wednesday, October 18, 2017 9:57 PM
To: Ughreja, Rakesh A <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capabilityQuoted 3 lines · Rakesh A
From: Rakesh Ughreja <[email protected]>
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...
Quoted 2 lines
list is not constructed properly. This may lead to driver going into unknown state.
Quoted 7 lines
I dont think we maintain driver states which are going wrong here
Quoted 3 lines
So whenever driver discovers unknown HDA capability, log it as error and stop traversing the link list further.
that sound good
Quoted 7 lines
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