]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: broadcom: bcm4908_enet: fix RX path possible mem leak
authorRafał Miłecki <rafal@milecki.pl>
Wed, 24 Feb 2021 15:18:41 +0000 (16:18 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Feb 2021 17:45:01 +0000 (09:45 -0800)
commit4dc7f09b8becfa35a55430a49d95acf19f996e6b
tree62ec44d63416c1c6cf0d95c7397bfcf631d09ea0
parentf176411401127a07a9360dec14eca448eb2e9d45
net: broadcom: bcm4908_enet: fix RX path possible mem leak

After filling RX ring slot with new skb it's required to free old skb.
Immediately on error or later in the net subsystem.

Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210224151842.2419-1-zajec5@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bcm4908_enet.c