From: Jiri Pirko <jiri@resnulli.us>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
David Ahern <dsa@cumulusnetworks.com>,
Networking <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [net-next] net: sched: avoid uninitialized variable use
Date: Thu, 18 Jan 2018 15:32:22 +0100 [thread overview]
Message-ID: <20180118143222.GB2063@nanopsycho.orion> (raw)
In-Reply-To: <CAK8P3a1KZiiVY-BF8QMHHUAUzHEJsB_FCMGWdSOsQUku7D7QNw@mail.gmail.com>
Thu, Jan 18, 2018 at 03:19:14PM CET, arnd@arndb.de wrote:
>On Thu, Jan 18, 2018 at 2:49 PM, Jiri Pirko <jiri@resnulli.us> wrote:
>> Thu, Jan 18, 2018 at 02:17:28PM CET, arnd@arndb.de wrote:
>>>gcc has identified a code path in which we pass uninitialized
>>>data into tc_dump_tfilter():
>>>
>>>net/sched/cls_api.c: In function 'tc_dump_tfilter':
>>>net/sched/cls_api.c:1268:8: error: 'parent' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>>
>>>This initializes the variable to the value it had before the previous
>>>change.
>>>
>>>Fixes: 7960d1daf278 ("net: sched: use block index as a handle instead of qdisc when block is shared")
>>>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>----
>>>I don't know if my patch is the best way to address the issue, but
>>>if not, then at least it helps show what the warning is about
>>>and lets someone else come up with a better solution.
>>
>> I already sent a fix for this:
>> http://patchwork.ozlabs.org/patch/862787/
>
>Ok. I've looked at your patch for way too long now and still don't see how
>you've shown it to be correct. Shouldn't there be a at least a comment
>to explain why zero is an appropriate initialization value in that case?
Okay. Will add comment.
>
> Arnd
prev parent reply other threads:[~2018-01-18 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 13:17 [PATCH] [net-next] net: sched: avoid uninitialized variable use Arnd Bergmann
2018-01-18 13:49 ` Jiri Pirko
2018-01-18 14:19 ` Arnd Bergmann
2018-01-18 14:32 ` Jiri Pirko [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=20180118143222.GB2063@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=jhs@mojatatu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@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