diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2020-07-31 10:38:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-03 15:14:46 -0700 |
commit | d6526926de7397a97308780911565e31a6b67b59 (patch) | |
tree | 3bb276db22a00431c7e11696cd6891d43e10a6ae /drivers | |
parent | 71fed0bc8665969f4681fc5772e5df42bfcc472e (diff) | |
download | lwn-d6526926de7397a97308780911565e31a6b67b59.tar.gz lwn-d6526926de7397a97308780911565e31a6b67b59.zip |
net: mvpp2: fix memory leak in mvpp2_rx
Release skb memory in mvpp2_rx() if mvpp2_rx_refill routine fails
Fixes: b5015854674b ("net: mvpp2: fix refilling BM pools in RX path")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 6a3f356640a0..4298a029be55 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -3508,6 +3508,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, err = mvpp2_rx_refill(port, bm_pool, pp, pool); if (err) { netdev_err(port->dev, "failed to refill BM pools\n"); + dev_kfree_skb_any(skb); goto err_drop_frame; } |