linux-stable/drivers/net/ethernet
David Arinzon f22bcdd1d1 net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0 ]

The patch mentioned in the `Fixes` tag removed the explicit assignment
of tx_info->xdpf to NULL with the justification that there's no need
to set tx_info->xdpf to NULL and tx_info->num_of_bufs to 0 in case
of a mapping error. Both values won't be used once the mapping function
returns an error, and their values would be overridden by the next
transmitted packet.

While both values do indeed get overridden in the next transmission
call, the value of tx_info->xdpf is also used to check whether a TX
descriptor's transmission has been completed (i.e. a completion for it
was polled).

An example scenario:
1. Mapping failed, tx_info->xdpf wasn't set to NULL
2. A VF reset occurred leading to IO resource destruction and
   a call to ena_free_tx_bufs() function
3. Although the descriptor whose mapping failed was freed by the
   transmission function, it still passes the check
     if (!tx_info->skb)

   (skb and xdp_frame are in a union)
4. The xdp_frame associated with the descriptor is freed twice

This patch returns the assignment of NULL to tx_info->xdpf to make the
cleaning function knows that the descriptor is already freed.

Fixes: 504fd6a539 ("net: ena: fix DMA mapping function issues in XDP")
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:23:34 +02:00
..
3com
8390 net: fill in MODULE_DESCRIPTION()s for 8390 2024-01-24 15:12:20 -08:00
actions
adaptec
adi net: ethernet: adi: move PHYLIB from vendor to driver symbol 2024-02-28 11:16:34 +00:00
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net: ena: Set tx_info->xdpf value to NULL 2024-04-17 11:23:34 +02:00
amd pds_core: Fix pdsc_check_pci_health function to use work thread 2024-04-17 11:23:31 +02:00
apm
apple
aquantia net: atlantic: Fix DMA mapping for PTP hwts ring 2024-02-02 20:47:05 -08:00
arc
asix net: asix: fix fortify warning 2023-12-12 13:20:37 -08:00
atheros ethernet: atheros: fix a memleak in atl1e_setup_ring_resources 2023-12-15 10:55:35 +00:00
broadcom bnxt_en: Reset PTP tx_avail after possible firmware reset 2024-04-17 11:23:29 +02:00
brocade bnad: fix work_queue type mismatch 2024-02-14 12:49:47 +00:00
cadence
calxeda
cavium net: fill in MODULE_DESCRIPTION()s for liquidio 2024-01-24 15:12:20 -08:00
chelsio net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
cirrus net: fill in MODULE_DESCRIPTION()s for ep93xxx_eth 2024-01-24 15:12:20 -08:00
cisco enic: Avoid false positive under FORTIFY_SOURCE 2024-02-19 10:57:27 +00:00
cortina net: ethernet: cortina: Drop TSO support 2024-01-07 16:05:00 +00:00
davicom
dec
dlink net: dl2k: Use proper conversion of dev_addr before IO to device 2023-12-12 11:25:36 +01:00
emulex net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
engleder tsnep: Fix mapping for zero copy XDP_TX action 2024-02-03 12:40:02 +00:00
ezchip net: fill in MODULE_DESCRIPTION()s for nps_enet 2024-01-24 15:12:20 -08:00
faraday
freescale net: fec: Set mac_managed_pm during probe 2024-04-10 16:38:05 +02:00
fujitsu
fungible net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
google gve: Fix skb truesize underestimation 2024-01-25 17:08:34 -08:00
hisilicon net: hns3: mark unexcuted loopback test result as UNEXECUTED 2024-04-10 16:37:57 +02:00
huawei net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
i825xx
ibm mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER 2024-01-08 15:27:15 -08:00
intel ice: use relative VSI index for VFs instead of PF VSI number 2024-04-13 13:10:02 +02:00
litex net: fill in MODULE_DESCRIPTION()s for litex 2024-01-24 15:12:21 -08:00
marvell octeontx2-af: Fix NIX SQ mode and BP config 2024-04-17 11:23:30 +02:00
mediatek net: ethernet: mtk_eth_soc: fix PPE hanging issue 2024-03-26 18:17:33 -04:00
mellanox net/mlx5e: Do not produce metadata freelist entries in Tx port ts WQE xmit 2024-04-17 11:23:33 +02:00
micrel net: ks8851: Handle softirqs at the end of IRQ thread to fix hang 2024-04-17 11:23:30 +02:00
microchip net: sparx5: fix wrong config being used when reconfiguring PCS 2024-04-17 11:23:33 +02:00
microsoft net: mana: Fix Rx DMA datasize and skb_over_panic 2024-04-10 16:38:03 +02:00
moxa
mscc net: mscc: ocelot: fix pMAC TX RMON stats for bucket 256-511 and above 2023-12-14 17:58:10 -08:00
myricom
natsemi
neterion net: fill in MODULE_DESCRIPTION()s for s2io 2024-01-11 16:16:08 -08:00
netronome nfp: flower: handle acti_netdevs allocation failure 2024-03-26 18:16:57 -04:00
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: set adminq irq affinity 2024-04-13 13:09:59 +02:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
qualcomm Including fixes from bpf and netfilter. 2024-01-18 17:33:50 -08:00
rdc
realtek r8169: skip DASH fw status checks when DASH is disabled 2024-04-10 16:38:07 +02:00
renesas net: ravb: Always update error counters 2024-04-10 16:38:08 +02:00
rocker
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-01-04 18:06:46 -08:00
sgi
silan
sis
smsc
socionext
stmicro net: stmmac: dwmac-starfive: Add support for JH7100 SoC 2024-04-13 13:09:57 +02:00
sun
sunplus
synopsys
tehuti
ti net: bql: fix building with BQL disabled 2024-03-01 08:46:15 +00:00
toshiba ps3/gelic: Fix SKB allocation 2024-02-23 11:59:30 +00:00
tundra
vertexcom
via
wangxun net: txgbe: fix i2c dev name cannot match clkdev 2024-04-10 16:38:05 +02:00
wiznet
xilinx net: ll_temac: platform_get_resource replaced by wrong function 2024-04-03 15:32:41 +02:00
xircom
xscale
Kconfig
Makefile
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c