public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org,
	elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] greybus: audio_codec: fix three missing initializers for data
Date: Mon, 28 Mar 2022 17:19:45 +0300	[thread overview]
Message-ID: <20220328141944.GT3293@kadam> (raw)
In-Reply-To: <20220327060120.4316-1-xiam0nd.tong@gmail.com>

On Sun, Mar 27, 2022 at 02:01:20PM +0800, Xiaomeng Tong wrote:
> These three bugs are here:
> 	struct gbaudio_data_connection *data;
> 
> If the list '&codec->module_list' is empty then the 'data' will
> keep unchanged.

All three of these functions check for if the codec->module_list is
empty at the start of the function so these are not real bugs.

Smatch is supposed to be able to figure this out, but apparently that
code is broken so Smatch still prints a warning.  :(

Apparently GCC does not print a warning for this.  Even when I delete
the check for list_empty() then GCC does not print a warning.  GCC often
assumes that we enter loops one time.  I haven't looked at that, but I
have noticed it in reviewing Smatch vs GCC warnings.

Generally we do not apply static checker work arounds.

I do not have a problem with this particular work around, but it needs
an updated commit message which says it is just to silence static
checker warnings and not to fix bugs.  Remove the Fixes tag.  Don't CC
stable.

regards,
dan carpenter


  parent reply	other threads:[~2022-03-28 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-27  6:01 [PATCH] greybus: audio_codec: fix three missing initializers for data Xiaomeng Tong
2022-03-27 19:24 ` Mark Greer
2022-03-28  8:14 ` Vaibhav Agarwal
2022-03-28 14:19 ` Dan Carpenter [this message]
2022-03-28 16:08   ` Mark Greer
2022-03-29  2:03   ` Xiaomeng Tong

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=20220328141944.GT3293@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mgreer@animalcreek.com \
    --cc=stable@vger.kernel.org \
    --cc=vaibhav.sr@gmail.com \
    --cc=xiam0nd.tong@gmail.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