linux-stable/drivers/net
David Arinzon 19ff8fed33 net: ena: Fix incorrect descriptor free behavior
[ Upstream commit bf02d9fe00 ]

ENA has two types of TX queues:
- queues which only process TX packets arriving from the network stack
- queues which only process TX packets forwarded to it by XDP_REDIRECT
  or XDP_TX instructions

The ena_free_tx_bufs() cycles through all descriptors in a TX queue
and unmaps + frees every descriptor that hasn't been acknowledged yet
by the device (uncompleted TX transactions).
The function assumes that the processed TX queue is necessarily from
the first category listed above and ends up using napi_consume_skb()
for descriptors belonging to an XDP specific queue.

This patch solves a bug in which, in case of a VF reset, the
descriptors aren't freed correctly, leading to crashes.

Fixes: 548c4940b9 ("net: ena: Implement XDP_TX action")
Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-17 11:18:26 +02:00
..
appletalk
arcnet
bonding
caif
can
dsa net: dsa: mt7530: trap link-local frames regardless of ST Port State 2024-04-17 11:18:25 +02:00
ethernet net: ena: Fix incorrect descriptor free behavior 2024-04-17 11:18:26 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan
mctp
mdio
netdevsim
pcs net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:04:58 +02:00
phy
plip
ppp
pse-pd
slip
team
usb
vmxnet3
vxlan
wan
wireguard
wireless wifi: ath11k: decrease MHI channel buffer length to 8KB 2024-04-13 13:04:59 +02:00
wwan
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c geneve: fix header validation in geneve[6]_xmit_skb 2024-04-17 11:18:23 +02:00
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c
vrf.c
vsockmon.c
xen-netfront.c