mirror_ubuntu-kernels/drivers/net/ethernet
Jacob Keller 135f4b9e93 ice: fix memory leak if register_netdev_fails
The ice_setup_pf_sw function can cause a memory leak if register_netdev
fails, due to accidentally failing to free the VSI rings. Fix the memory
leak by using ice_vsi_release, ensuring we actually go through the full
teardown process.

This should be safe even if the netdevice is not registered because we
will have set the netdev pointer to NULL, ensuring ice_vsi_release won't
call unregister_netdev.

An alternative fix would be moving management of the PF VSI netdev into
the main VSI setup code. This is complicated and likely requires
significant refactor in how we manage VSIs

Fixes: 3a858ba392 ("ice: Add support for VSI allocation and deallocation")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2020-09-25 07:39:24 -07:00
..
3com treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
8390 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
adaptec starfire: use generic power management 2020-07-01 12:58:33 -07:00
aeroflex Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver 2020-07-07 15:44:27 -07:00
agere net: ethernet: et131x: Remove redundant register read 2020-07-17 18:48:15 -07:00
alacritech treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
allwinner
alteon treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
altera
amazon net: ena: Make missed_tx stat incremental 2020-08-19 15:32:58 -07:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
apm
apple
aquantia net: atlantic: Use readx_poll_timeout() for large timeout 2020-08-19 16:25:29 -07:00
arc net: arc_emac: Fix memleak in arc_mdio_probe 2020-08-24 17:59:44 -07:00
atheros net: ag71xx: add missed clk_disable_unprepare in error path of probe 2020-07-20 18:37:38 -07:00
aurora net: nb8800: fix nb8800_xmit()'s return type 2020-06-28 20:52:53 -07:00
broadcom net/ethernet/broadcom: fix spelling typo 2020-09-24 20:05:48 -07:00
brocade treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cadence net: macb: fix for pause frame receive enable bit 2020-09-06 11:58:59 -07:00
calxeda
cavium treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
chelsio cxgb4: fix memory leak during module unload 2020-09-17 16:29:20 -07:00
cirrus docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
cisco treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cortina net: gemini: Fix another missing clk_disable_unprepare() in probe 2020-09-02 15:40:18 -07:00
davicom treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dec net: dec: de2104x: Increase receive ring size for Tulip 2020-09-10 15:28:53 -07:00
dlink net: sundance: Replace HTTP links with HTTPS ones 2020-07-15 17:41:34 -07:00
emulex treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ezchip
faraday
freescale net/fsl: quieten expected MDIO access failures 2020-09-24 20:13:26 -07:00
fujitsu
google
hisilicon net: hns: kerneldoc fixes 2020-09-18 14:22:58 -07:00
huawei hinic: fix wrong return value of mac-set cmd 2020-09-24 20:00:40 -07:00
i825xx
ibm ibmvnic: add missing parenthesis in do_reset() 2020-09-07 14:03:11 -07:00
intel ice: fix memory leak if register_netdev_fails 2020-09-25 07:39:24 -07:00
marvell net: mvneta: recycle the page in case of out-of-order 2020-09-20 14:12:24 -07:00
mediatek treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mellanox net/mlx5e: mlx5e_fec_in_caps() returns a boolean 2020-09-21 17:22:25 -07:00
micrel ksz884x: switch from 'pci_' to 'dma_' API 2020-07-14 15:10:29 -07:00
microchip treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
moxa
mscc net: mscc: ocelot: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries 2020-09-21 17:40:52 -07:00
myricom ethernet: myri10ge: use generic power management 2020-07-20 18:01:07 -07:00
natsemi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
neterion treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
netronome nfp: use correct define to return NONE fec 2020-09-17 17:59:12 -07:00
ni net: nixge: fix potential memory leak in nixge_probe() 2020-07-30 16:55:39 -07:00
nvidia
nxp
oki-semi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
packetengines treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pasemi
pensando ionic: fix txrx work accounting 2020-08-31 12:19:57 -07:00
qlogic net: qed: RDMA personality shouldn't fail VF load 2020-09-09 14:28:18 -07:00
qualcomm net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init 2020-08-11 10:36:47 -07:00
rdc r6040: switch from 'pci_' to 'dma_' API 2020-07-20 17:49:50 -07:00
realtek treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
renesas Revert "ravb: Fixed to be able to unload modules" 2020-09-23 17:38:36 -07:00
rocker treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
samsung treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
seeq
sfc sfc: Fix error code in probe 2020-09-21 13:55:13 -07:00
sgi net: sgi: ioc3-eth: Fix the size used in some 'dma_free_coherent()' calls 2020-08-03 16:00:26 -07:00
silan sc92031: use generic power management 2020-07-30 17:43:01 -07:00
sis treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
smsc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
socionext treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
stmicro net: stmmac: removed enabling eee in EEE set callback 2020-09-23 18:08:06 -07:00
sun treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
synopsys net: dwc-xlgmac: fix xlgmac_xmit()'s return type 2020-06-28 20:52:53 -07:00
tehuti
ti net: ethernet: ti: cpsw_new: fix suspend/resume 2020-09-11 17:36:28 -07:00
toshiba treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tundra
via via-velocity: Use more typical logging styles 2020-08-04 12:54:49 -07:00
wiznet
xilinx net: ll_temac: Use devm_platform_ioremap_resource_byname() 2020-07-30 17:44:28 -07:00
xircom treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: switch from 'pci_' to 'dma_' API 2020-07-20 18:32:49 -07:00
jme.c net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
jme.h net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Add locking for TX DMA channel 2020-09-23 18:01:03 -07:00
Makefile