linux-stable/drivers/net
Arnd Bergmann ab58070569 mlxsw: spectrum_router: avoid potential uninitialized data usage
If fi->fib_nhs is zero, the router interface pointer is uninitialized, as shown by
this warning:

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c: In function 'mlxsw_sp_router_fib_event':
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:1674:21: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:1643:23: note: 'r' was declared here

This changes the loop so we handle the case the same way as finding no router
interface pointer attached to one of the nexthops to ensure we always
trap here instead of using uninitialized data.

Fixes: b45f64d16d ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-03 01:55:18 -04:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-09-12 15:52:44 -07:00
caif virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-02 22:20:41 -04:00
cris
dsa net: dsa: mv88e6xxx: add eeprom ops 2016-09-30 01:26:00 -04:00
ethernet mlxsw: spectrum_router: avoid potential uninitialized data usage 2016-10-03 01:55:18 -04:00
fddi
fjes fjes: Delete owner assignment 2016-08-15 11:57:55 -07:00
hamradio 6pack: fix buffer length mishandling 2016-09-20 22:51:30 -04:00
hippi
hyperv hv_netvsc: fix comments 2016-09-24 09:36:12 -04:00
ieee802154 fakelb: fix schedule while atomic 2016-09-19 20:19:34 +02:00
ipvlan ipvlan: Introduce l3s mode 2016-09-19 01:25:22 -04:00
irda
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-09-23 06:46:57 -04:00
plip
ppp ppp: declare PPP devices as LLTX 2016-08-31 14:33:09 -07:00
slip
team team: loadbalance: push lacpdus to exact delivery 2016-08-26 13:08:59 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-09-23 06:46:57 -04:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-30 00:54:02 -04:00
wan net: wan: sbni: Spelling s/acknoweledge/acknowledge/, Grammar 2016-08-31 09:26:30 -07:00
wimax net: wimax: i2400m: usb-notif: don't print error when allocating urb fails 2016-08-13 14:53:40 -07:00
wireless wireless-drivers-next patches for 4.9 2016-09-30 01:31:51 -04:00
xen-netback Revert "xen-netback: create a debugfs node for hash information" 2016-09-23 09:09:31 -04:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig ipvlan: Fix dependency issue 2016-09-20 22:55:23 -04:00
LICENSE.SRC
loopback.c
macsec.c macsec: set network devtype 2016-09-09 16:52:43 -07:00
macvlan.c net: remove type_check from dev_get_nest_level() 2016-08-13 15:15:54 -07:00
macvtap.c macvtap: fix use after free for skb_array during release 2016-08-11 09:55:51 -07:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-30 00:54:02 -04:00
veth.c net: veth: Set features for MPLS 2016-08-30 22:27:18 -07:00
virtio_net.c
vrf.c net: vrf: Remove RT_FL_TOS 2016-09-17 10:05:05 -04:00
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-09-12 15:52:44 -07:00
xen-netfront.c xen-netfront: avoid packet loss when ethernet header crosses page boundary 2016-09-20 04:40:41 -04:00