net: mvpp2: fix memory leak in mvpp2_rx
Release skb memory in mvpp2_rx() if mvpp2_rx_refill routine fails
Fixes: b501585467
("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>
This commit is contained in:
Родитель
71fed0bc86
Коммит
d6526926de
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче