All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: "Ughreja, Rakesh A" <rakesh.a.ughreja@intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2] ALSA: hda: Abort capability probe on invalid capability
Date: Wed, 18 Oct 2017 21:56:51 +0530	[thread overview]
Message-ID: <20171018162651.GA30097@localhost> (raw)
In-Reply-To: <1508370325-3118-1-git-send-email-rakesh.a.ughreja@intel.com>

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

  reply	other threads:[~2017-10-18 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-10-18 16:52   ` Ughreja, Rakesh A
2017-10-19  7:15     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171018162651.GA30097@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.