From: Ammar Faizi <ammarfaizi2@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
kbuild@lists.01.org, Daniel Baluta <daniel.baluta@nxp.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: Re: [ammarfaizi2-block:broonie/sound/for-5.18 33/171] sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48)
Date: Sat, 12 Mar 2022 05:41:42 +0700 [thread overview]
Message-ID: <7ea1ca0f-804c-bde8-6c75-5822f260531b@gmail.com> (raw)
In-Reply-To: <202203120019.KjXsD7LN-lkp@intel.com>
On 3/12/22 1:59 AM, Dan Carpenter wrote:
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> New smatch warnings:
> sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48)
>
> vim +/cstream +54 sound/soc/sof/compress.c
>
> 858f7a5c45cacb Daniel Baluta 2021-10-04 46 void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream)
> 858f7a5c45cacb Daniel Baluta 2021-10-04 47 {
> 6324cf901e14c6 Daniel Baluta 2022-01-20 @48 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
> ^^^^^^^^^^^^^^^^^^^^^^
> 6324cf901e14c6 Daniel Baluta 2022-01-20 49 struct snd_compr_runtime *crtd = cstream->runtime;
> ^^^^^^^^^^^^^^^^^
> Dereference
>
> 858f7a5c45cacb Daniel Baluta 2021-10-04 50 struct snd_soc_component *component;
> 6324cf901e14c6 Daniel Baluta 2022-01-20 51 struct snd_compr_tstamp *tstamp;
> 858f7a5c45cacb Daniel Baluta 2021-10-04 52 struct snd_sof_pcm *spcm;
> 858f7a5c45cacb Daniel Baluta 2021-10-04 53
> 858f7a5c45cacb Daniel Baluta 2021-10-04 @54 if (!cstream)
> ^^^^^^^^
> Checked too late
Hi Dan,
Thanks for reporting, it has already been fixed in commit
7e4bfcf10a03981 ("ASoC: SOF: compress: fix null check after dereference")
Link: https://git.kernel.org/broonie/sound/c/7e4bfcf10a03981
Regards,
--
Ammar Faizi
prev parent reply other threads:[~2022-03-11 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 18:59 Dan Carpenter
2022-03-11 22:41 ` Ammar Faizi [this message]
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=7ea1ca0f-804c-bde8-6c75-5822f260531b@gmail.com \
--to=ammarfaizi2@gmail.com \
--cc=broonie@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=daniel.baluta@nxp.com \
--cc=gwml@vger.gnuweeb.org \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®