From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: kys@microsoft.com, haiyangz@microsoft.com,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
vkuznets@redhat.com, stephen@networkplumber.org,
sixiao@microsoft.com, devel@linuxdriverproject.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 21/28] net/hyperv: avoid uninitialized variable
Date: Tue, 18 Oct 2016 14:21:10 -0400 (EDT) [thread overview]
Message-ID: <20161018.142110.10381887028686813.davem@davemloft.net> (raw)
In-Reply-To: <20161017221650.1902729-2-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 18 Oct 2016 00:16:09 +0200
> The hdr_offset variable is only if we deal with a TCP or UDP packet,
> but as the check surrounding its usage tests for skb_is_gso()
> instead, the compiler has no idea if the variable is initialized
> or not at that point:
>
> drivers/net/hyperv/netvsc_drv.c: In function ‘netvsc_start_xmit’:
> drivers/net/hyperv/netvsc_drv.c:494:42: error: ‘hdr_offset’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> This adds an additional check for the transport type, which
> tells the compiler that this path cannot happen. Since the
> get_net_transport_info() function should always be inlined
> here, I don't expect this to result in additional runtime
> checks.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
next prev parent reply other threads:[~2016-10-18 18:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 22:03 [PATCH 00/28] Reenable maybe-uninitialized warnings Arnd Bergmann
2016-10-17 22:05 ` [PATCH 01/28] [v2] netfilter: nf_tables: avoid uninitialized variable warning Arnd Bergmann
2016-10-18 15:23 ` Pablo Neira Ayuso
2016-10-17 22:13 ` [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap Arnd Bergmann
2016-10-26 6:49 ` Kalle Valo
2016-10-26 9:57 ` Arnd Bergmann
2016-10-26 11:11 ` Kalle Valo
[not found] ` <20161017221355.1861551-7-arnd-r2nGTMty4D4@public.gmane.org>
2016-10-27 15:05 ` [19/28] " Kalle Valo
2016-10-17 22:16 ` [PATCH 20/28] net: bcm63xx: avoid referencing uninitialized variable Arnd Bergmann
2016-10-18 18:21 ` David Miller
2016-10-17 22:16 ` [PATCH 21/28] net/hyperv: avoid " Arnd Bergmann
2016-10-18 18:21 ` David Miller [this message]
2016-10-17 22:16 ` [PATCH 27/28] rocker: fix maybe-uninitialized warning Arnd Bergmann
2016-10-18 18:21 ` David Miller
2016-10-17 22:19 ` [PATCH 28/28] Kbuild: bring back -Wmaybe-uninitialized warning Arnd Bergmann
2016-10-18 5:08 ` [PATCH 00/28] Reenable maybe-uninitialized warnings Christoph Hellwig
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=20161018.142110.10381887028686813.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sixiao@microsoft.com \
--cc=stephen@networkplumber.org \
--cc=torvalds@linux-foundation.org \
--cc=vkuznets@redhat.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;
as well as URLs for NNTP newsgroup(s).