linux/drivers/net
Christophe JAILLET 59b1281361 net/sonic: Fix some resource leaks in error handling paths
[ Upstream commit 0f7ba7bc46 ]

A call to dma_alloc_coherent() is wrapped by sonic_alloc_descriptors().

This is correctly freed in the remove function, but not in the error
handling path of the probe function. Fix this by adding the missing
dma_free_coherent() call.

While at it, rename a label in order to be slightly more informative.

Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Chris Zankel <chris@zankel.net>
References: commit 10e3cc180e ("net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'")
Fixes: 74f2a5f0ef ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.")
Fixes: efcce83936 ("[PATCH] macsonic/jazzsonic network drivers update")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-17 14:04:19 +01:00
..
appletalk
arcnet
bonding bonding: wait for sysfs kobject destruction before freeing struct slave 2020-12-08 10:18:53 +01:00
caif
can can: softing: softing_netdev_open(): fix error handling 2020-12-30 11:25:44 +01:00
dsa net: dsa: mv88e6xxx: Avoid VTU corruption on 6097 2020-11-24 13:27:17 +01:00
ethernet net/sonic: Fix some resource leaks in error handling paths 2021-01-17 14:04:19 +01:00
fddi
fjes fjes: fix missed check in fjes_acpi_add 2019-12-31 16:34:36 +01:00
hamradio yam: fix possible memory leak in yam_init_driver 2020-06-25 15:32:51 +02:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-29 10:16:48 +02:00
hyperv hv_netvsc: Remove "unlikely" from netvsc_select_queue 2020-09-23 12:10:57 +02:00
ieee802154 ieee802154/adf7242: check status of adf7242_read_reg 2020-10-01 13:14:51 +02:00
ipvlan ipvlan: fix device features 2020-09-03 11:24:17 +02:00
netdevsim
phy sfp: Fix error handing in sfp_probe() 2020-11-10 12:35:54 +01:00
plip
ppp pppoe: only process PADT targeted at local interfaces 2020-05-20 08:18:36 +02:00
slip slip: not call free_netdev before rtnl_unlock in slip_open 2020-03-20 11:55:54 +01:00
team net: team: fix memory leak in __team_options_register 2020-10-14 10:31:24 +02:00
usb net: cdc_ncm: correct overhead in delayed_ndp_size 2021-01-17 14:04:18 +01:00
vmxnet3 net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss() 2020-06-22 09:05:12 +02:00
wan net: hdlc_ppp: Fix issues when mod_timer is called while timer is running 2021-01-12 20:10:19 +01:00
wimax wimax/i2400m: Fix potential urb refcnt leak 2020-05-10 10:30:08 +02:00
wireless mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start 2021-01-09 13:43:48 +01:00
xen-netback xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() 2020-12-30 11:26:17 +01:00
dummy.c
eql.c
geneve.c Revert "geneve: pull IP header before ECN decapsulation" 2020-12-11 13:25:04 +01:00
gtp.c gtp: fix an use-before-init in gtp_newlink() 2020-11-05 11:08:32 +01:00
ifb.c
Kconfig geneve: change NET_UDP_TUNNEL dependency to select 2019-12-05 09:21:10 +01:00
LICENSE.SRC
loopback.c
macsec.c macsec: avoid use-after-free in macsec_handle_frame() 2020-10-14 10:31:23 +02:00
macvlan.c macvlan: validate setting of multiple remote source MAC addresses 2020-09-03 11:24:26 +02:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c net_failover: fixed rollback in net_failover_open() 2020-06-22 09:04:58 +02:00
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: fix sleep time mismatch 2019-12-01 09:17:13 +01:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS 2021-01-12 20:10:19 +01:00
veth.c veth: Adjust hard_start offset on redirect XDP frames 2020-06-22 09:05:17 +02:00
virtio_net.c virtio_net: Fix recursive call to cpus_read_lock() 2021-01-12 20:10:18 +01:00
vrf.c vrf: Fix fast path output packet handling with async Netfilter rules 2020-11-18 19:18:52 +01:00
vsockmon.c
vxlan.c vxlan: Copy needed_tailroom from lowerdev 2020-12-30 11:25:46 +01:00
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2020-08-05 10:06:05 +02:00