linux_dsm_epyc7002/drivers/net/ethernet
Sameeh Jubran 8ee8ee7fe8 net: ena: fix: set freed objects to NULL to avoid failing future allocations
In some cases when a queue related allocation fails, successful past
allocations are freed but the pointer that pointed to them is not
set to NULL. This is a problem for 2 reasons:
1. This is generally a bad practice since this pointer might be
accidentally accessed in the future.
2. Future allocations using the same pointer check if the pointer
is NULL and fail if it is not.

Fixed this by setting such pointers to NULL in the allocation of
queue related objects.

Also refactored the code of ena_setup_tx_resources() to goto-style
error handling to avoid code duplication of resource freeing.

Fixes: 1738cd3ed3 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-04 00:14:46 -04:00
..
3com 3c515: fix integer overflow warning 2019-03-19 15:07:49 -07:00
8390 mac8390: Fix mmio access size probe 2019-03-18 16:56:57 -07:00
adaptec net: adaptec: starfire: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
aeroflex
agere
alacritech
allwinner
alteon net: alteon: replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-01-28 23:09:19 -08:00
altera net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case 2019-01-27 10:39:07 -08:00
amazon net: ena: fix: set freed objects to NULL to avoid failing future allocations 2019-05-04 00:14:46 -04:00
amd net: amd: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
apm
apple net: apple: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
aquantia net: aquantia: fix rx checksum offload for UDP/TCP over IPv6 2019-03-18 16:59:35 -07:00
arc net: arc_emac: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
atheros net: atheros: fix spelling mistake "underun" -> "underrun" 2019-04-23 18:46:27 -07:00
aurora
broadcom bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt(). 2019-04-27 17:00:19 -04:00
brocade bna: fix indentation issue on call to bfa_ioc_pf_failed 2019-02-02 20:14:38 -08:00
cadence net: macb driver, check for SKBTX_HW_TSTAMP 2019-04-08 16:38:23 -07:00
calxeda
cavium net: thunderx: don't allow jumbo frames with XDP 2019-04-11 11:10:34 -07:00
chelsio libcxgb: fix incorrect ppmax calculation 2019-04-04 17:40:26 -07:00
cirrus
cisco enic: fix build warning without CONFIG_CPUMASK_OFFSTACK 2019-03-07 09:41:08 -08:00
cortina
davicom
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
dlink net:dl2k: Replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-02-14 12:25:24 -05:00
emulex benet: remove broken and unused macro 2019-01-28 10:56:01 -08:00
ezchip
faraday drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
freescale net: fec: manage ahb clock in runtime pm 2019-04-11 13:53:28 -07:00
fujitsu net: fujitsu: fix a potential NULL pointer dereference 2019-03-12 14:48:35 -07:00
hisilicon net: hns: Fix sparse: some warnings in HNS drivers 2019-04-04 10:35:42 -07:00
hp
huawei
i825xx net: i825xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:14 -05:00
ibm ibmvnic: Fix netdev feature clobbering during a reset 2019-04-10 12:29:37 -07:00
intel i40e: add tracking of AF_XDP ZC state for each queue pair 2019-04-01 11:32:48 -07:00
marvell sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 2019-03-04 11:31:25 -08:00
mediatek drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
mellanox net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query 2019-04-19 13:55:37 -07:00
micrel net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
microchip lan743x: Fix TX Stall Issue 2019-03-13 13:41:46 -07:00
moxa net: moxa: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
mscc ocelot: Clean up stats update deferred work 2019-04-16 21:43:53 -07:00
myricom net: myri10ge: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
natsemi net: ns83820: code cleanup for ns83820_probe_phy() 2019-02-19 14:08:19 -08:00
neterion vxge: fix return of a free'd memblock on a failed dma mapping 2019-04-12 16:54:41 -07:00
netronome nfp: abm: fix spelling mistake "offseting" -> "offsetting" 2019-04-17 23:22:26 -07:00
ni net: nixge: Add support for fixed-link configurations 2019-02-05 10:34:34 -08:00
nuvoton net: nuvoton: w90p910_ether: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
nvidia
nxp
oki-semi pci-v5.1-changes 2019-03-09 14:57:08 -08:00
packetengines net: packetengines: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
pasemi net: pasemi: set a 64-bit DMA mask on the DMA device 2019-02-18 22:41:01 +11:00
qlogic qed: fix spelling mistake "faspath" -> "fastpath" 2019-04-16 21:39:10 -07:00
qualcomm net: qualcomm: emac: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
rdc
realtek r8169: disable ASPM again 2019-04-08 15:19:16 -07:00
renesas net: sh_eth: fix a missing check of of_get_phy_mode 2019-03-12 14:51:02 -07:00
rocker net: rocker: fix a potential NULL pointer dereference 2019-03-11 16:17:31 -07:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
sgi net: sgi: use GFP_ATOMIC under spin lock 2019-02-17 15:51:46 -08:00
silan
sis net: sis900: fix indentation issues, remove some spaces 2019-03-15 11:59:00 -07:00
smsc smc911x: pass struct device to DMA API functions 2019-02-12 12:09:24 -05:00
socionext net: socionext: replace napi_alloc_frag with the netdev variant on init 2019-04-23 19:39:16 -07:00
stmicro stmmac: pci: Fix typo in IOT2000 comment 2019-05-01 09:15:52 -04:00
sun net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry 2019-03-08 15:26:21 -08:00
synopsys
tehuti net: tehuti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
ti net: ethernet: ti: fix possible object reference leak 2019-03-23 21:21:24 -04:00
toshiba
tundra
via net: via-velocity: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
wiznet
xilinx net: xilinx: fix possible object reference leak 2019-03-23 21:21:24 -04:00
xircom
xscale net: ixp4xx_eth: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:54 -08:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net: fealnx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c lantiq_etop: pass struct device to DMA API functions 2019-02-12 12:09:23 -05:00
lantiq_xrx200.c net: lantiq: Do not use eth_change_mtu() 2019-02-24 17:35:42 -08:00
Makefile
netx-eth.c