linux_dsm_epyc7002/drivers/net/hyperv
Arnd Bergmann 52ccd63184 net/hyperv: avoid uninitialized variable
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-18 14:20:36 -04:00
..
hyperv_net.h hv_netvsc: fix comments 2016-09-24 09:36:12 -04:00
Kconfig
Makefile
netvsc_drv.c net/hyperv: avoid uninitialized variable 2016-10-18 14:20:36 -04:00
netvsc.c hv_netvsc: use consume_skb 2016-09-23 08:39:48 -04:00
rndis_filter.c hv_netvsc: style cleanups 2016-08-23 12:05:36 -07:00