android_kernel_xiaomi_sm8350/drivers/net
Andy Gospodarek 2439f9ebd4 bonding: fix race that causes invalid statistics
I've seen reports of invalid stats in /proc/net/dev for bonding
interfaces, and found it's a pretty easy problem to reproduce.  Since
the current code zeros the bonding stats when a read is requested and a
pointer to that data is returned to the caller we cannot guarantee that
the caller has completely accessed the data before a successive call to
request the stats zeroes the stats again.

This patch creates a new stack variable to keep track of the updated
stats and copies the data from that variable into the bonding stats
structure.  This ensures that the value for any of the bonding stats
should not incorrectly return zero for any of the bonding statistics.
This does use more stack space and require an extra memcpy, but it seems
like a fair trade-off for consistently correct bonding statistics.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Chris Snook <csnook@redhat.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:13 -08:00
..
appletalk
arcnet
arm
atl1 atl1: fix frame length bug 2008-01-18 14:41:49 -05:00
bonding bonding: fix race that causes invalid statistics 2008-02-03 04:28:13 -08:00
can [CAN]: Add virtual CAN netdevice driver 2008-01-28 14:54:12 -08:00
chelsio annotate chelsio 2008-01-28 15:10:29 -08:00
cris
cxgb3 annotate cxgb3 2008-01-28 15:10:30 -08:00
e1000 e1000: make e1000_dump_eeprom() static 2008-02-03 04:28:07 -08:00
e1000e e1000e: tweak irq allocation messages 2008-02-03 04:28:08 -08:00
ehea ehea: fix sysfs link compile problem 2008-02-03 04:26:00 -08:00
fec_8xx [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
fs_enet [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
hamradio NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
ibm_emac
ibm_newemac Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
igb igb: remove unneeded declaration shadowing earlier one 2008-02-03 04:28:09 -08:00
irda [IrDA]: Irport removal - part 2 2008-01-28 15:08:10 -08:00
ixgb ixgb: enable sun hardware support for broadcom phy 2008-01-28 15:07:17 -08:00
ixgbe ixgbe endianness annotations 2008-01-28 15:07:15 -08:00
ixp2000 [NET]: Do not check netif_running() and carrier state in ->poll() 2008-01-08 23:30:09 -08:00
mlx4 mlx4_core: Fix max_eqs masking in QUERY_DEV_CAP 2008-01-25 14:15:29 -08:00
myri10ge annotate myri10ge 2008-01-28 15:10:31 -08:00
netxen annotate netxen 2008-01-28 15:10:31 -08:00
pcmcia pcmcia net: use roundup_pow_of_two() macro instead of grotesque loop 2008-01-28 15:07:19 -08:00
phy PHYLIB: Add BCM5482 PHY support 2008-02-03 04:26:28 -08:00
sk98lin drivers/net/sk98lin: Add missing "space" 2008-01-28 15:03:58 -08:00
skfp NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
tokenring olympic_open() must be __devinit 2008-02-03 04:26:11 -08:00
tulip [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
usb rtl8150: use default MTU of 1500 2008-02-03 04:26:15 -08:00
wan annotate the rest of drivers/net/wan 2008-01-28 15:07:58 -08:00
wireless Add new driver 'rndis_wlan' for wireless RNDIS devices. 2008-01-31 19:27:01 -08:00
3c59x.c
3c501.c 3c501: Bring into compliance with the coding style 2008-01-28 15:04:00 -08:00
3c501.h
3c503.c
3c503.h
3c505.c
3c505.h
3c507.c [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
3c509.c 3c509: PnP resource management fix 2008-01-12 17:41:04 -05:00
3c515.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
3c523.c
3c523.h
3c527.c
3c527.h
7990.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
7990.h
8139cp.c
8139too.c
8390.c
8390.h
82596.c
a2065.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
a2065.h
ac3200.c
acenic_firmware.h
acenic.c
acenic.h
amd8111e.c drivers/net: Add missing "space" 2008-01-28 15:03:59 -08:00
amd8111e.h
apne.c
ariadne.c
ariadne.h
at1700.c [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
atarilance.c
atp.c
atp.h
au1000_eth.c
au1000_eth.h
ax88796.c NET: AX88796 use dev_dbg() instead of printk() 2008-02-03 04:26:09 -08:00
b44.c b44: power down PHY when interface down 2008-01-28 15:09:19 -08:00
b44.h
bfin_mac.c
bfin_mac.h
bmac.c
bmac.h
bnx2_fw2.h [BNX2]: Update firmware. 2008-01-31 19:27:17 -08:00
bnx2_fw.h [BNX2]: Update firmware. 2008-01-31 19:27:17 -08:00
bnx2.c [BNX2]: Fix ASYM PAUSE advertisement for remote PHY. 2008-01-31 19:28:28 -08:00
bnx2.h [BNX2]: Fine-tune flow control on 5709. 2008-01-31 19:27:16 -08:00
bnx2x_fw_defs.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bnx2x_hsi.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bnx2x_init_values.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bnx2x_init.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bnx2x_reg.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bnx2x.c [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
bnx2x.h add bnx2x driver for BCM57710 2008-01-28 15:03:53 -08:00
bsd_comp.c
cassini.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
cassini.h [CASSINI]: Fix endianness bug. 2008-01-04 00:47:04 -08:00
cpmac.c [netdrvr] irq handler minor cleanups in several drivers 2008-01-28 15:03:40 -08:00
cs89x0.c
cs89x0.h
de600.c
de600.h
de620.c
de620.h
declance.c [netdrvr] irq handler minor cleanups in several drivers 2008-01-28 15:03:40 -08:00
defxx.c
defxx.h
depca.c
depca.h
dl2k.c dl2k: the rest 2008-01-18 14:44:33 -05:00
dl2k.h Fix dl2k constants 2008-02-01 20:54:03 +11:00
dm9000.c [ARM] 4762/1: Basic support for Toradex Colibri module 2008-01-28 13:13:27 +00:00
dm9000.h
dummy.c
e100.c e100: fix spelling errors 2008-02-03 04:28:07 -08:00
e2100.c
eepro100.c eepro100 annotations 2008-01-28 15:07:59 -08:00
eepro.c
eexpress.c [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
eexpress.h
enc28j60_hw.h add driver for enc28j60 ethernet chip 2008-01-28 15:08:03 -08:00
enc28j60.c add driver for enc28j60 ethernet chip 2008-01-28 15:08:03 -08:00
epic100.c [NET]: Do not check netif_running() and carrier state in ->poll() 2008-01-08 23:30:09 -08:00
eql.c
es3210.c
eth16i.c
ewrk3.c
ewrk3.h
fealnx.c
fec_mpc52xx_phy.c [POWERPC] mpc5200: normalize compatible property bindings 2008-01-26 15:26:01 -07:00
fec_mpc52xx.c [POWERPC] mpc5200: normalize compatible property bindings 2008-01-26 15:26:01 -07:00
fec_mpc52xx.h
fec.c
fec.h
forcedeth.c forcedeth endianness bugs 2008-01-28 15:07:13 -08:00
gianfar_ethtool.c
gianfar_mii.c
gianfar_mii.h
gianfar_sysfs.c gianfar driver: eliminate compiler warnings and unnecessary macros 2008-01-28 15:05:47 -08:00
gianfar.c
gianfar.h
hamachi.c hamachi endianness fixes 2007-12-14 15:26:15 -05:00
hp100.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
hp100.h
hp-plus.c
hp.c
hplance.c
hplance.h
hydra.c
ibmlana.c ibmlana_init_one() must be __devinit 2008-02-03 04:26:12 -08:00
ibmlana.h
ibmveth.c Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
ibmveth.h
ifb.c
ioc3-eth.c
ipg.c ipg: add __devexit annotation 2008-01-28 15:05:54 -08:00
ipg.h ipg: fix checkpatch reported errors 2008-01-28 15:05:53 -08:00
isa-skeleton.c
iseries_veth.c Kobject: rename kobject_init_ng() to kobject_init() 2008-01-24 20:40:38 -08:00
jazzsonic.c
Kconfig IBMLANA no longer has to depend on MCA_LEGACY 2008-02-03 04:26:13 -08:00
lance.c
lasi_82596.c
lib8390.c
lib82596.c
LICENSE.SRC
lne390.c
loopback.c [NET]: Remove unused define from loopback driver. 2008-01-28 14:57:25 -08:00
lp486e.c [netdrvr] checkpatch cleanups 2008-01-28 15:04:05 -08:00
mac89x0.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
mac8390.c
macb.c macb: Fix section mismatch and shrink runtime footprint 2008-02-03 04:26:00 -08:00
macb.h
mace.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
mace.h
macmace.c
macsonic.c
macvlan.c [MACVLAN]: Setting macvlan_handle_frame_hook to NULL when rtnl_link_register() fails. 2008-01-31 19:28:25 -08:00
Makefile igb: PCI-Express 82575 Gigabit Ethernet driver 2008-01-28 15:10:33 -08:00
meth.c [METH]: Fix MAC address handling. 2008-01-08 23:30:00 -08:00
meth.h
mii.c
mipsnet.c Fix/Rewrite of the mipsnet driver] 2008-02-03 04:28:10 -08:00
mv643xx_eth.c
mvme147.c
myri_code.h
myri_sbus.c
myri_sbus.h
natsemi.c [NET]: Do not check netif_running() and carrier state in ->poll() 2008-01-08 23:30:09 -08:00
ne2.c
ne2k-pci.c
ne3210.c
ne-h8300.c
ne.c
netconsole.c [NETPOLL]: no need to store local_mac 2008-01-28 14:54:17 -08:00
netx-eth.c [NET]: Fix netx-eth.c compilation. 2008-01-08 23:29:59 -08:00
ni52.c
ni52.h
ni65.c
ni65.h
ni5010.c
ni5010.h
niu.c [NIU]: Use print_mac 2008-01-28 14:59:15 -08:00
niu.h [NIU]: Support for Marvell PHY 2008-01-10 02:12:44 -08:00
ns83820.c NET: ns83820.c remove fastcall macro 2008-01-28 15:07:56 -08:00
pasemi_mac.c pasemi_mac: Disable interface on close 2008-02-03 04:27:55 -08:00
pasemi_mac.h pasemi_mac: add support for setting MTU 2008-02-03 04:27:54 -08:00
pci-skeleton.c
pcnet32.c netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LEN 2008-01-28 15:03:36 -08:00
plip.c PLIP driver: convert the semaphore killed_timer_sem to completion 2008-01-28 15:07:20 -08:00
ppp_async.c
ppp_deflate.c [PPP]: Sparse warning fixes. 2008-01-28 15:11:27 -08:00
ppp_generic.c [PPP]: Sparse warning fixes. 2008-01-28 15:11:27 -08:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c [PPP]: Sparse warning fixes. 2008-01-28 15:11:27 -08:00
pppoe.c [PPP]: Sparse warning fixes. 2008-01-28 15:11:27 -08:00
pppol2tp.c drivers/net: Add missing "space" 2008-01-28 15:03:59 -08:00
pppox.c
ps3_gelic_net.c [POWERPC] PS3: Make bus_id and dev_id u64 2008-01-25 22:52:51 +11:00
ps3_gelic_net.h
qla3xxx.c qla3xxx annotations 2008-01-28 15:08:00 -08:00
qla3xxx.h qla3xxx annotations 2008-01-28 15:08:00 -08:00
r6040.c r6040: cleanups 2008-01-28 15:04:16 -08:00
r8169.c r8169: fix missing loop variable increment 2008-01-12 17:41:04 -05:00
rionet.c
rrunner.c drivers/net: Add missing "space" 2008-01-28 15:03:59 -08:00
rrunner.h rrunner: use offsetof() instead of homegrown insanity 2007-12-22 22:53:07 -05:00
s2io-regs.h [S2IO]: Support for add/delete/store/restore ethernet addresses 2008-01-28 15:03:52 -08:00
s2io.c S2io: Fix for LRO Bugs 2008-02-03 04:27:38 -08:00
s2io.h S2io: Fix for LRO Bugs 2008-02-03 04:27:38 -08:00
saa9730.c
saa9730.h
sb1000.c
sb1250-mac.c
sc92031.c
seeq8005.c
seeq8005.h
sgiseeq.c SGISEEQ: fix oops when doing ifconfig down; ifconfig up 2008-01-28 15:08:02 -08:00
sgiseeq.h
sis190.c sis190: scheduling while atomic error 2008-01-23 03:11:45 -08:00
sis900.c drivers/net: Add missing "space" 2008-01-28 15:03:59 -08:00
sis900.h
skge.c
skge.h
sky2.c sky2: version 1.21 2008-01-28 15:08:02 -08:00
sky2.h sky2: support for Yukon Supreme 2008-01-28 15:08:01 -08:00
slhc.c [PPP]: Sparse warning fixes. 2008-01-28 15:11:27 -08:00
slip.c slip: Drag kicking and screaming into coding style compliance 2008-01-28 15:04:01 -08:00
slip.h
smc91x.c [NET] smc91x: Make smc91x use IRQ resource trigger flags 2008-01-28 13:13:19 +00:00
smc91x.h [ARM] 4746/1: pcm027: network support for phyCORE-PXA270 2008-01-28 13:13:23 +00:00
smc911x.c
smc911x.h net: smc911x: shut up compiler warnings 2007-12-14 16:12:42 -05:00
smc9194.c drivers/net: Add missing "space" 2008-01-28 15:03:59 -08:00
smc9194.h
smc-mca.c
smc-ultra32.c
smc-ultra.c
sni_82596.c
sonic.c
sonic.h
Space.c
spider_net_ethtool.c
spider_net.c
spider_net.h
starfire_firmware.h
starfire_firmware.pl
starfire.c starfire VLAN fix 2007-12-14 15:26:04 -05:00
stnic.c
sun3_82586.c
sun3_82586.h
sun3lance.c
sunbmac.c net/sunbmac.c section fix 2008-02-03 04:26:15 -08:00
sunbmac.h
sundance.c sundance: SIOCDEVPRIVATE pollution 2008-01-28 15:03:46 -08:00
sungem_phy.c
sungem_phy.h
sungem.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
sungem.h sungem endianness annotations 2008-01-28 15:07:10 -08:00
sunhme.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
sunhme.h sunhme endianness annotations 2008-01-28 15:07:09 -08:00
sunlance.c
sunqe.c net/sunqe.c section fix 2008-02-03 04:26:14 -08:00
sunqe.h
sunvnet.c drivers/net/sunvnet.c:print_version() must be __devinit 2008-02-03 04:26:13 -08:00
sunvnet.h
tc35815.c tc35815: Use irq number for tc35815-mac platform device id 2008-01-22 00:35:23 +00:00
tehuti_fw.h
tehuti.c netdev: ARRAY_SIZE() cleanups 2008-01-28 15:03:37 -08:00
tehuti.h
tg3.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
tg3.h [TG3]: Replace some magic 5704S constants 2008-01-28 14:59:32 -08:00
tlan.c
tlan.h
tsi108_eth.c
tsi108_eth.h
tun.c annotate tun 2008-01-28 15:07:57 -08:00
typhoon-firmware.h
typhoon.c typhoon: trivial endianness annotations 2007-12-22 22:53:06 -05:00
typhoon.h typhoon: trivial endianness annotations 2007-12-22 22:53:06 -05:00
ucc_geth_ethtool.c
ucc_geth_mii.c ucc_geth: get rid of device_type for mdio 2008-01-28 08:32:56 -06:00
ucc_geth_mii.h ucc_geth: really fix section mismatch 2007-12-17 16:02:20 -05:00
ucc_geth.c ucc_geth: add support for netpoll 2008-02-03 04:25:59 -08:00
ucc_geth.h
veth.c [NET]: rtnl_link: fix use-after-free 2008-01-20 20:31:45 -08:00
via-rhine.c via-rhine.c:rhine_hw_init() must be __devinit 2008-02-03 04:26:10 -08:00
via-velocity.c big-endian support for via-velocity 2008-02-03 04:26:27 -08:00
via-velocity.h big-endian support for via-velocity 2008-02-03 04:26:27 -08:00
virtio_net.c
wd.c
xen-netfront.c NULL noise in drivers/net 2008-01-28 15:07:12 -08:00
yellowfin.c yellowfin: annotations and fixes (.24 fodder?) 2007-12-22 22:53:06 -05:00
znet.c
zorro8390.c