linux/drivers/net
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
..
appletalk
arcnet
bonding bonding: fix event handling for stacked bonds 2019-04-15 13:22:09 -07:00
caif
can peak_usb: fix clang build warning 2019-03-07 09:39:46 -08:00
dsa net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc 2019-04-30 11:02:37 -04:00
ethernet net: ena: fix: set freed objects to NULL to avoid failing future allocations 2019-05-04 00:14:46 -04:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: fix race that may miss tx queue wakeup 2019-05-03 23:50:25 -04:00
ieee802154 net: ieee802154: fix missing checks for regmap_update_bits 2019-04-24 20:15:15 +02:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-24 12:06:19 -08:00
netdevsim
phy net: phy: marvell: Fix buffer overrun with stats counters 2019-04-26 12:06:14 -04:00
plip
ppp pptp: dst_release sk_dst_cache in pptp_sock_destruct 2019-03-13 14:22:49 -07:00
slip slip: make slhc_free() silently accept an error pointer 2019-04-26 18:19:09 -07:00
team team: fix possible recursive locking when add slaves 2019-04-19 14:57:35 -07:00
usb qmi_wwan: new Wistron, ZTE and D-Link devices 2019-04-26 11:30:44 -04:00
vmxnet3
wan net: wan: z85230: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-25 14:36:15 -08:00
wimax
wireless Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2019-04-29 19:33:33 +03:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-02 12:54:35 -08:00
dummy.c
eql.c
geneve.c geneve: correctly handle ipv6.disable module parameter 2019-03-01 22:07:56 -08:00
gtp.c
ifb.c
Kconfig gtp: change NET_UDP_TUNNEL dependency to select 2019-03-18 16:54:42 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: add ndo_change_proto_down support 2019-02-24 13:01:04 -08:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c net: Don't set transport offset to invalid value 2019-02-22 12:55:31 -08:00
thunderbolt.c
tun.c tun: add a missing rcu_read_unlock() in error path 2019-03-16 13:16:37 -07:00
veth.c veth: Fix -Wformat-truncation 2019-02-23 13:44:58 -08:00
virtio_net.c
vrf.c net: vrf: Fix operation not supported when set vrf mac 2019-04-24 11:45:04 -07:00
vsockmon.c
vxlan.c vxlan: Don't call gro_cells_destroy() before device is unregistered 2019-03-18 17:07:27 -07:00
xen-netfront.c