mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 20:01:47 -05:00
net: ena: xdp: XDP_TX: fix memory leak
When sending very high packet rate, the XDP tx queues can get full and
start dropping packets. In this case we don't free the pages which
results in ena driver draining the system memory.
Fix:
Simply free the pages when necessary.
Fixes: 548c4940b9 ("net: ena: Implement XDP_TX action")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
bb986a5042
commit
cd07ecccba
@@ -355,7 +355,7 @@ static int ena_xdp_xmit_buff(struct net_device *dev,
|
||||
ena_unmap_tx_buff(xdp_ring, tx_info);
|
||||
tx_info->xdpf = NULL;
|
||||
error_drop_packet:
|
||||
|
||||
__free_page(tx_info->xdp_rx_page);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user