WSL2-Linux-Kernel/drivers/net
Tom Rix f4544e5361 net: mvneta: fix double free of txq->buf
clang static analysis reports this problem:

drivers/net/ethernet/marvell/mvneta.c:3465:2: warning:
  Attempt to free released memory
        kfree(txq->buf);
        ^~~~~~~~~~~~~~~

When mvneta_txq_sw_init() fails to alloc txq->tso_hdrs,
it frees without poisoning txq->buf.  The error is caught
in the mvneta_setup_txqs() caller which handles the error
by cleaning up all of the txqs with a call to
mvneta_txq_sw_deinit which also frees txq->buf.

Since mvneta_txq_sw_deinit is a general cleaner, all of the
partial cleaning in mvneta_txq_sw_deinit()'s error handling
is not needed.

Fixes: 2adb719d74 ("net: mvneta: Implement software TSO")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-10-04 15:07:19 -07:00
..
appletalk treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
arcnet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bonding net: core: introduce struct netdev_nested_priv for nested interface infrastructure 2020-09-28 15:00:15 -07:00
caif
can treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dsa net: dsa: seville: fix VCAP IS2 action width 2020-09-29 13:24:17 -07:00
ethernet net: mvneta: fix double free of txq->buf 2020-10-04 15:07:19 -07:00
fddi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
fjes treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hamradio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hippi
hyperv hv_netvsc: Add validation for untrusted Hyper-V values 2020-09-17 16:21:26 -07:00
ieee802154 ieee802154/adf7242: check status of adf7242_read_reg 2020-08-03 20:19:21 +02:00
ipa net: ipa: fix u32_replace_bits by u32p_xxx version 2020-09-11 17:28:48 -07:00
ipvlan ipvlan: fix device features 2020-08-16 15:15:00 -07:00
netdevsim treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy net: phy: realtek: fix rtl8211e rx/tx delay config 2020-09-29 12:55:33 -07:00
plip treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ppp mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
slip
team net: team: fix memory leak in __team_options_register 2020-10-04 14:47:22 -07:00
usb net: usb: pegasus: Proper error handing when setting pegasus' MAC address 2020-10-02 15:18:42 -07:00
vmxnet3 vmxnet3: fix cksum offload issues for non-udp tunnels 2020-09-25 16:41:40 -07:00
wan drivers/net/wan/x25_asy: Correct the ndo_open and ndo_stop functions 2020-09-24 19:52:58 -07:00
wimax treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
wireguard wireguard: peerlookup: take lock before checking hash in replace operation 2020-09-09 11:31:38 -07:00
wireless net: core: introduce struct netdev_nested_priv for nested interface infrastructure 2020-09-28 15:00:15 -07:00
xen-netback treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig
LICENSE.SRC
Makefile
Space.c
bareudp.c tunnels: PMTU discovery support for directly bridged IP packets 2020-08-04 13:01:45 -07:00
dummy.c
eql.c
geneve.c geneve: add transport ports in route lookup for geneve 2020-09-16 17:41:38 -07:00
gtp.c gtp: add GTPA_LINK info to msg sent to userspace 2020-08-25 06:28:53 -07:00
ifb.c
loopback.c
macsec.c
macvlan.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macvtap.c
mdio.c
mii.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-08-05 20:13:21 -07:00
tun.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
veth.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
virtio_net.c virtio-net: don't disable guest csum when disable LRO 2020-09-29 12:53:19 -07:00
vrf.c
vsockmon.c
vxlan.c Revert "vxlan: fix tos value before xmit" 2020-08-05 12:09:10 -07:00
xen-netfront.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00