OpenCloudOS-Kernel/drivers/net
Jarod Wilson 72ccc471e1 bonding: fix randomly populated arp target array
In commit dc9c4d0fe0, the arp_target array moved from a static global
to a local variable. By the nature of static globals, the array used to
be initialized to all 0. At present, it's full of random data, which
that gets interpreted as arp_target values, when none have actually been
specified. Systems end up booting with spew along these lines:

[   32.161783] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
[   32.168475] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
[   32.175089] 8021q: adding VLAN 0 to HW filter on device lacp0
[   32.193091] IPv6: ADDRCONF(NETDEV_UP): lacp0: link is not ready
[   32.204892] lacp0: Setting MII monitoring interval to 100
[   32.211071] lacp0: Removing ARP target 216.124.228.17
[   32.216824] lacp0: Removing ARP target 218.160.255.255
[   32.222646] lacp0: Removing ARP target 185.170.136.184
[   32.228496] lacp0: invalid ARP target 255.255.255.255 specified for removal
[   32.236294] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
[   32.243987] lacp0: Removing ARP target 56.125.228.17
[   32.249625] lacp0: Removing ARP target 218.160.255.255
[   32.255432] lacp0: Removing ARP target 15.157.233.184
[   32.261165] lacp0: invalid ARP target 255.255.255.255 specified for removal
[   32.268939] lacp0: option arp_ip_target: invalid value (-255.255.255.255)
[   32.276632] lacp0: Removing ARP target 16.0.0.0
[   32.281755] lacp0: Removing ARP target 218.160.255.255
[   32.287567] lacp0: Removing ARP target 72.125.228.17
[   32.293165] lacp0: Removing ARP target 218.160.255.255
[   32.298970] lacp0: Removing ARP target 8.125.228.17
[   32.304458] lacp0: Removing ARP target 218.160.255.255

None of these were actually specified as ARP targets, and the driver does
seem to clean up the mess okay, but it's rather noisy and confusing, leaks
values to userspace, and the 255.255.255.255 spew shows up even when debug
prints are disabled.

The fix: just zero out arp_target at init time.

While we're in here, init arp_all_targets_value in the right place.

Fixes: dc9c4d0fe0 ("bonding: reduce scope of some global variables")
CC: Mahesh Bandewar <maheshb@google.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
CC: stable@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-22 14:38:22 -04:00
..
appletalk Annotate hardware config module parameters in drivers/net/appletalk/ 2017-04-20 12:02:32 +01:00
arcnet Annotate hardware config module parameters in drivers/net/arcnet/ 2017-04-20 12:02:32 +01:00
bonding bonding: fix randomly populated arp target array 2017-05-22 14:38:22 -04:00
caif virtio: wrap find_vqs 2017-05-02 23:41:42 +03:00
can Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
cris
dsa net: dsa: mv88e6xxx: add default case to switch 2017-05-12 12:14:40 -04:00
ethernet net: atheros: atl2: don't return zero on failure path in atl2_probe() 2017-05-22 12:05:01 -04:00
fddi format-security: move static strings to const 2017-05-08 17:15:14 -07:00
fjes
hamradio Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
hippi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-09 15:42:31 -07:00
hyperv netvsc: make sure napi enabled before vmbus_open 2017-05-04 11:08:36 -04:00
ieee802154 ieee802154: don't select COMMON_CLK 2017-04-22 10:28:40 +02:00
ipvlan ipvlan: use pernet operations and restrict l3s hooks to master netns 2017-04-25 10:43:22 -04:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-15 15:50:49 -07:00
phy mdio: mux: fix device_node_continue.cocci warnings 2017-05-15 14:28:10 -04:00
plip
ppp
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-26 22:39:08 -04:00
usb smsc95xx: Support only IPv4 TCP/UDP csum offload 2017-05-21 13:31:48 -04:00
vmxnet3 vmxnet3: ensure that adapter is in proper state during force_close 2017-05-12 12:23:52 -04:00
wan Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
wimax drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison 2017-05-09 09:40:33 -04:00
wireless Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
xen-netback
Kconfig VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
LICENSE.SRC
Makefile VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
Space.c
dummy.c
eql.c
geneve.c geneve: fix incorrect setting of UDP checksum flag 2017-04-30 22:31:16 -04:00
gtp.c
ifb.c
loopback.c
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-26 22:39:08 -04:00
macvlan.c macvlan: Fix performance issues with vlan tagged packets 2017-05-15 14:18:11 -04:00
macvtap.c
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
tun.c
veth.c netlink: pass extended ACK struct to parsing functions 2017-04-13 13:58:22 -04:00
virtio_net.c virtio: fixes, cleanups, performance 2017-05-10 11:33:08 -07:00
vrf.c driver: vrf: Fix one possible use-after-free issue 2017-05-11 12:13:11 -04:00
vsockmon.c VSOCK: Add vsockmon device 2017-04-24 12:35:56 -04:00
vxlan.c vxlan: do not output confusing error message 2017-04-30 22:30:13 -04:00
xen-netfront.c xen-netfront: avoid crashing on resume after a failure in talk_to_netback() 2017-05-11 21:38:50 -04:00