Skip to content

Commit d652692

Browse files
LorenzoBianconidavem330
authored andcommitted
net: mvpp2: fix memory leak in mvpp2_rx
Release skb memory in mvpp2_rx() if mvpp2_rx_refill routine fails Fixes: b501585 ("net: mvpp2: fix refilling BM pools in RX path") Signed-off-by: Lorenzo Bianconi <[email protected]> Acked-by: Matteo Croce <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 71fed0b commit d652692

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi,
35083508
err = mvpp2_rx_refill(port, bm_pool, pp, pool);
35093509
if (err) {
35103510
netdev_err(port->dev, "failed to refill BM pools\n");
3511+
dev_kfree_skb_any(skb);
35113512
goto err_drop_frame;
35123513
}
35133514

0 commit comments

Comments
 (0)