From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Cc: alsa-devel@alsa-project.org, Arnd Bergmann <arnd@arndb.de>,
Vinod Koul <vinod.koul@intel.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
Jeeja KP <jeeja.kp@intel.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [patch] ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc()
Date: Tue, 3 May 2016 16:58:07 +0900 [thread overview]
Message-ID: <57285A0F.7060603@sakamocchi.jp> (raw)
In-Reply-To: <20160503074258.GA9722@mwanda>
On May 03 2016 16:42, Dan Carpenter wrote:
> We intended || here instead of &&. The original code potentially leads
> to a NULL dereference.
>
> Fixes: 2889099eb8cd ('ASoC: hdac_hdmi: Register chmap controls and ops')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Indeed.
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
> index 3043120..7e7ff1b 100644
> --- a/sound/soc/codecs/hdac_hdmi.c
> +++ b/sound/soc/codecs/hdac_hdmi.c
> @@ -1609,7 +1609,7 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
> struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
> struct hdac_hdmi_pin *pin = pcm->pin;
>
> - if (!pin && !pin->eld.eld_valid)
> + if (!pin || !pin->eld.eld_valid)
> return 0;
>
> return pin->eld.info.spk_alloc;
Regards
Takashi Sakamoto
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Cc: alsa-devel@alsa-project.org, Arnd Bergmann <arnd@arndb.de>,
Vinod Koul <vinod.koul@intel.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
Jeeja KP <jeeja.kp@intel.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [patch] ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc()
Date: Tue, 03 May 2016 07:58:07 +0000 [thread overview]
Message-ID: <57285A0F.7060603@sakamocchi.jp> (raw)
In-Reply-To: <20160503074258.GA9722@mwanda>
On May 03 2016 16:42, Dan Carpenter wrote:
> We intended || here instead of &&. The original code potentially leads
> to a NULL dereference.
>
> Fixes: 2889099eb8cd ('ASoC: hdac_hdmi: Register chmap controls and ops')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Indeed.
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
> index 3043120..7e7ff1b 100644
> --- a/sound/soc/codecs/hdac_hdmi.c
> +++ b/sound/soc/codecs/hdac_hdmi.c
> @@ -1609,7 +1609,7 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
> struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
> struct hdac_hdmi_pin *pin = pcm->pin;
>
> - if (!pin && !pin->eld.eld_valid)
> + if (!pin || !pin->eld.eld_valid)
> return 0;
>
> return pin->eld.info.spk_alloc;
Regards
Takashi Sakamoto
WARNING: multiple messages have this Message-ID (diff)
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Liam Girdwood <lgirdwood@gmail.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Cc: alsa-devel@alsa-project.org, Arnd Bergmann <arnd@arndb.de>,
Vinod Koul <vinod.koul@intel.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
Jeeja KP <jeeja.kp@intel.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [patch] ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc()
Date: Tue, 3 May 2016 16:58:07 +0900 [thread overview]
Message-ID: <57285A0F.7060603@sakamocchi.jp> (raw)
In-Reply-To: <20160503074258.GA9722@mwanda>
On May 03 2016 16:42, Dan Carpenter wrote:
> We intended || here instead of &&. The original code potentially leads
> to a NULL dereference.
>
> Fixes: 2889099eb8cd ('ASoC: hdac_hdmi: Register chmap controls and ops')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Indeed.
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
> index 3043120..7e7ff1b 100644
> --- a/sound/soc/codecs/hdac_hdmi.c
> +++ b/sound/soc/codecs/hdac_hdmi.c
> @@ -1609,7 +1609,7 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
> struct hdac_hdmi_pcm *pcm = get_hdmi_pcm_from_id(hdmi, pcm_idx);
> struct hdac_hdmi_pin *pin = pcm->pin;
>
> - if (!pin && !pin->eld.eld_valid)
> + if (!pin || !pin->eld.eld_valid)
> return 0;
>
> return pin->eld.info.spk_alloc;
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2016-05-03 7:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 7:42 [patch] ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc() Dan Carpenter
2016-05-03 7:42 ` Dan Carpenter
2016-05-03 7:42 ` Dan Carpenter
2016-05-03 7:58 ` Takashi Sakamoto [this message]
2016-05-03 7:58 ` Takashi Sakamoto
2016-05-03 7:58 ` Takashi Sakamoto
2016-05-03 9:50 ` Vinod Koul
2016-05-03 9:56 ` Vinod Koul
2016-05-03 16:06 ` Vinod Koul
2016-05-03 16:18 ` Vinod Koul
2016-05-03 16:31 ` Applied "ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc()" to the asoc tree Mark Brown
2016-05-03 16:31 ` Mark Brown
2016-05-03 16:31 ` Mark Brown
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=57285A0F.7060603@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=jeeja.kp@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=subhransu.s.prusty@intel.com \
--cc=sudipm.mukherjee@gmail.com \
--cc=tiwai@suse.com \
--cc=vinod.koul@intel.com \
/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.