linux_dsm_epyc7002/drivers/net
Marc Zyngier 2670cc699a net: sun4i-emac: fix memory leak on bad packet
Upon reception of a new frame, the emac driver checks for a number
of error conditions, and flag the packet as "bad" if any of these
are present. It then allocates a skb unconditionally, but only uses
it if the packet is "good". On the error path, the skb is just forgotten,
and the system leaks memory.

The piece of junk I have on my desk seems to encounter such error
frequently enough so that the box goes OOM after a couple of days,
which makes me grumpy.

Fix this by moving the allocation on the "good_packet" path (and
convert it to netdev_alloc_skb while we're at it).

Tested on a random Allwinner A20 board.

Cc: Stefan Roese <sr@denx.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: <stable@vger.kernel.org> # 3.11+
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-05 16:43:49 -07:00
..
appletalk
arcnet
bonding bonding: use kobject_put instead of _del after kobject_add 2014-07-31 11:16:09 -07:00
caif
can can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource() 2014-07-25 09:23:08 +02:00
cris
dsa net: dsa: update DSA drivers to use ds_to_priv 2014-04-30 13:31:25 -04:00
ethernet net: sun4i-emac: fix memory leak on bad packet 2014-08-05 16:43:49 -07:00
fddi defxx: Fix !DYNAMIC_BUFFERS compilation warnings 2014-07-02 18:26:29 -07:00
hamradio
hippi
hyperv hyperv: Fix error return code in netvsc_init_buf() 2014-07-23 14:55:47 -07:00
ieee802154 at86rf230: fix irq setup 2014-06-22 18:04:03 -07:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
phy Revert "net: phy: Set the driver when registering an MDIO bus device" 2014-08-05 16:41:52 -07:00
plip
ppp net: ppp: fix creating PPP pass and active filters 2014-07-16 23:42:06 -07:00
slip slip: Fix deadlock in write_wakeup 2014-06-16 21:29:12 -07:00
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
usb cdc_subset: deal with a device that needs reset for timeout 2014-08-02 15:44:18 -07:00
vmxnet3 vmxnet3: adjust ring sizes when interface is down 2014-06-16 21:26:40 -07:00
wan wan/x25_asy: integer overflow in x25_asy_change_mtu() 2014-07-17 16:47:50 -07:00
wimax net: wimax: i2400m: control.c: Cleaning up conjunction always evaluates to false 2014-06-11 00:13:16 -07:00
wireless ath9k: fix aggregation session lockup 2014-07-23 13:03:11 -04:00
xen-netback xen-netback: Fix pointer incrementation to avoid incorrect logging 2014-07-20 20:56:06 -07:00
dummy.c
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: Initialize vlan_features to turn on offload support. 2014-07-31 22:10:01 -07:00
macvtap.c mactap: Fix checksum errors for non-gso packets in bridge mode 2014-04-30 16:12:22 -04:00
Makefile r8152: add missing Makefile rule 2014-08-02 20:53:55 -07:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c net: use ethtool_cmd_speed_set helper to set ethtool speed value 2014-06-06 16:24:07 -07:00
rionet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
sb1000.c
Space.c
sungem_phy.c
tun.c net-tun: restructure tun_do_read for better sleep/wakeup efficiency 2014-05-21 15:50:28 -04:00
veth.c
virtio_net.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
vxlan.c neighbour : fix ndm_type type error issue 2014-07-28 17:52:17 -07:00
xen-netfront.c xen-netfront: print correct number of queues 2014-07-31 22:23:52 -07:00