linux-stable/drivers/net
Carol L Soto c02b05011f net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes
When doing memcpy/memset of EQEs, we should use sizeof struct
mlx4_eqe as the base size and not caps.eqe_size which could be bigger.

If caps.eqe_size is bigger than the struct mlx4_eqe then we corrupt
data in the master context.

When using a 64 byte stride, the memcpy copied over 63 bytes to the
slave_eq structure.  This resulted in copying over the entire eqe of
interest, including its ownership bit -- and also 31 bytes of garbage
into the next WQE in the slave EQ -- which did NOT include the ownership
bit (and therefore had no impact).

However, once the stride is increased to 128, we are overwriting the
ownership bits of *three* eqes in the slave_eq struct.  This results
in an incorrect ownership bit for those eqes, which causes the eq to
seem to be full. The issue therefore surfaced only once 128-byte EQEs
started being used in SRIOV and (overarchitectures that have 128/256
byte cache-lines such as PPC) - e.g after commit 77507aa249
"net/mlx4_core: Enable CQE/EQE stride support".

Fixes: 08ff32352d ('mlx4: 64-byte CQE/EQE support')
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27 20:27:11 -07:00
..
appletalk
arcnet
bonding
caif
can can: peak_pci: add unused device id. in devices table 2015-09-30 12:57:58 +02:00
cris
dsa dsa: mv88e6xxx: Enable forwarding for unknown to the CPU port 2015-09-29 21:06:51 -07:00
ethernet net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes 2015-10-27 20:27:11 -07:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipvlan
irda
phy net: phy: mdio: add missing of_node_put 2015-10-26 22:08:12 -07:00
plip
ppp ppp: fix pppoe_dev deletion condition in pppoe_release() 2015-10-23 03:30:01 -07:00
slip
team
usb qmi_wwan: add Sierra Wireless MC74xx/EM74xx 2015-10-22 07:56:21 -07:00
vmxnet3
wan
wimax
wireless ath6kl: add missing of_node_put 2015-10-26 22:08:12 -07:00
xen-netback xen-netback: correctly check failed allocation 2015-10-18 19:37:29 -07:00
dummy.c
eql.c
geneve.c openvswitch: Fix egress tunnel info. 2015-10-22 19:39:25 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c macvtap: unbreak receiving of gro skb with frag list 2015-10-23 02:34:39 -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
veth.c
virtio_net.c
vrf.c
vxlan.c openvswitch: Fix egress tunnel info. 2015-10-22 19:39:25 -07:00
xen-netfront.c xen-netfront: update num_queues to real created 2015-10-21 07:45:39 -07:00