linux-uconsole/drivers/net
Arnd Bergmann 9a35bc2ae5 hostap: avoid uninitialized variable use in hfa384x_get_rid
commit 48dc5fb3ba upstream.

The driver reads a value from hfa384x_from_bap(), which may fail,
and then assigns the value to a local variable. gcc detects that
in in the failure case, the 'rlen' variable now contains
uninitialized data:

In file included from ../drivers/net/wireless/intersil/hostap/hostap_pci.c:220:0:
drivers/net/wireless/intersil/hostap/hostap_hw.c: In function 'hfa384x_get_rid':
drivers/net/wireless/intersil/hostap/hostap_hw.c:842:5: warning: 'rec' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (le16_to_cpu(rec.len) == 0) {

This restructures the function as suggested by Russell King, to
make it more readable and get more reliable error handling, by
handling each failure mode using a goto.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-30 05:49:28 +02:00
..
appletalk
arcnet arcnet/com20020: add LEDS_CLASS dependency 2015-11-03 11:29:56 -05:00
bonding bonding: Fix bonding crash 2016-09-30 10:18:36 +02:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer 2017-03-12 06:37:28 +01:00
cris
dsa net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change 2016-12-10 19:07:23 +01:00
ethernet ibmveth: calculate gso_segs for large packets 2017-04-21 09:30:08 +02:00
fddi
fjes fjes: fix inconsistent indenting 2015-11-15 17:09:23 -05:00
hamradio mkiss: fix scribble on freed memory 2016-01-06 15:06:27 -05:00
hippi
hyperv hv_netvsc: use skb_get_hash() instead of a homegrown implementation 2017-03-26 12:13:18 +02:00
ieee802154 fakelb: fix schedule while atomic 2017-03-15 09:57:15 +08:00
ipvlan ipvlan: fix use after free of skb 2015-11-17 14:39:29 -05:00
irda net: irda: Fix use-after-free in irtty_open() 2016-04-12 09:08:49 -07:00
phy net: phy: bcm63xx: Utilize correct config_intr function 2017-02-04 09:45:09 +01:00
plip
ppp ppp: defer netns reference release for ppp channel 2017-01-06 11:16:17 +01:00
slip ppp, slip: Validate VJ compression slot parameters completely 2015-11-02 16:25:00 -05:00
team team: don't call netdev_change_features under team->lock 2016-06-24 10:18:17 -07:00
usb catc: Use heap buffer for memory size test 2017-04-21 09:30:08 +02:00
vmxnet3 Driver: Vmxnet3: Fix regression caused by 5738a09 2016-01-06 16:20:13 -05:00
wan farsync: fix off-by-one bug in fst_add_one 2016-04-20 15:42:03 +09:00
wimax
wireless hostap: avoid uninitialized variable use in hfa384x_get_rid 2017-04-30 05:49:28 +02:00
xen-netback xen: bug fixes for 4.4-rc5 2015-12-18 12:24:52 -08:00
dummy.c net: dummy: add more features 2015-10-21 19:36:10 -07:00
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-10 19:07:24 +01:00
ifb.c
Kconfig net: Add IPv6 support to VRF device 2015-10-13 04:55:07 -07:00
LICENSE.SRC
loopback.c net: introduce device min_header_len 2017-02-18 16:39:27 +01:00
macvlan.c macvlan: fix leak in macvlan_handle_frame 2015-11-17 14:39:29 -05:00
macvtap.c macvtap: read vnet_hdr_size once 2017-02-18 16:39:27 +01:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: use per-attribute show and store methods 2015-10-13 22:17:51 -07:00
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: fix deadlock on SMP 2016-04-12 09:08:58 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: read vnet_hdr_sz once 2017-02-18 16:39:27 +01:00
veth.c veth: don’t modify ip_summed; doing so treats packets with bad checksums as good. 2015-12-22 15:15:34 -05:00
virtio_net.c virtio-net: add a missing synchronize_net() 2016-12-10 19:07:22 +01:00
vrf.c vrf: Fix use-after-free in vrf_xmit 2017-03-22 12:04:16 +01:00
vxlan.c vxlan: correctly validate VXLAN ID against VXLAN_N_VID 2017-03-22 12:04:13 +01:00
xen-netfront.c xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend() 2017-02-14 15:22:52 -08:00