2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-26 15:45:14 +08:00
linux-next/drivers/net
Finn Thain 89ba879e95 net/sonic: Fix receive buffer replenishment
As soon as the driver is finished with a receive buffer it allocs a new
one and overwrites the corresponding RRA entry with a new buffer pointer.

Problem is, the buffer pointer is split across two word-sized registers.
It can't be updated in one atomic store. So this operation races with the
chip while it stores received packets and advances its RRP register.
This could result in memory corruption by a DMA write.

Avoid this problem by adding buffers only at the location given by the
RWP register, in accordance with the National Semiconductor datasheet.

Re-factor this code into separate functions to calculate a RRA pointer
and to update the RWP.

Fixes: efcce83936 ("[PATCH] macsonic/jazzsonic network drivers update")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-01-23 21:24:37 +01:00
..
appletalk
arcnet
bonding bonding: fix active-backup transition after link failure 2019-12-14 16:22:34 -08:00
caif Driver core patches for 5.5-rc1 2019-11-27 11:06:20 -08:00
can can, slip: Protect tty->disc_data in write_wakeup and close with RCU 2020-01-22 20:32:03 +01:00
dsa net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec 2020-01-17 13:26:27 +01:00
ethernet net/sonic: Fix receive buffer replenishment 2020-01-23 21:24:37 +01:00
fddi
fjes Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
hamradio 6pack,mkiss: fix possible deadlock 2019-12-13 21:49:29 -08:00
hippi
hyperv hv_netvsc: Fix memory leak when removing rndis device 2020-01-15 22:37:45 +01:00
ieee802154 drivers: net: Fix Kconfig indentation, continued 2019-11-21 11:54:09 -08:00
ipvlan
netdevsim devlink: correct misspelling of snapshot 2020-01-11 14:30:24 -08:00
phy net: phy: dp83867: Set FORCE_LINK_GOOD to default after reset 2020-01-17 11:36:18 +01:00
plip
ppp pppoe: remove redundant BUG_ON() check in pppoe_pernet 2019-12-07 11:52:23 -08:00
slip can, slip: Protect tty->disc_data in write_wakeup and close with RCU 2020-01-22 20:32:03 +01:00
team
usb r8152: disable DelayPhyPwrChg 2020-01-23 11:20:57 +01:00
vmxnet3
wan net: wan: lapbether.c: Use built-in RCU list checking 2020-01-16 14:30:52 +01:00
wimax
wireless wireless-drivers fixes for v5.5 2020-01-23 14:30:20 +01:00
xen-netback xen-netback: avoid race that can lead to NULL pointer dereference 2019-12-15 11:40:15 -08:00
dummy.c net: dummy: use standard dev_lstats_add() and dev_lstats_read() 2019-11-07 20:03:08 -08:00
eql.c
geneve.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
gtp.c gtp: make sure only SOCK_DGRAM UDP sockets are accepted 2020-01-23 11:16:54 +01:00
ifb.c
Kconfig drivers: net: Fix Kconfig indentation, continued 2019-11-21 11:54:09 -08:00
LICENSE.SRC
loopback.c net: use u64_stats_t in struct pcpu_lstats 2019-11-07 20:03:08 -08:00
macsec.c
macvlan.c macvlan: use skb_reset_mac_header() in macvlan_queue_xmit() 2020-01-16 13:12:37 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c net: nlmon: use standard dev_lstats_add() and dev_lstats_read() 2019-11-07 20:03:08 -08:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: add mutex_unlock() call and napi.skb clearing in tun_get_user() 2020-01-23 11:42:44 +01:00
veth.c veth: use standard dev_lstats_add() and dev_lstats_read() 2019-11-07 20:03:08 -08:00
virtio_net.c bpf: Convert bpf_prog refcnt to atomic64_t 2019-11-18 11:41:59 +01:00
vrf.c
vsockmon.c vsockmon: use standard dev_lstats_add() and dev_lstats_read() 2019-11-07 20:03:08 -08:00
vxlan.c vxlan: fix tos value before xmit 2020-01-02 16:35:48 -08:00
xen-netfront.c