diff options
author | Sameeh Jubran <sameehj@amazon.com> | 2020-06-03 08:50:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-04 15:43:01 -0700 |
commit | cd07ecccba13b8bd5023ffe7be57363d07e3105f (patch) | |
tree | 06fdfec7abba760b49b7f75740e9ddef5b90a697 /drivers/net | |
parent | bb986a50421a11bf31a81afb15b9b8f45a4a3a11 (diff) | |
download | linux-rt-cd07ecccba13b8bd5023ffe7be57363d07e3105f.tar.gz |
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: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index a0af74c93971..e101fc934f83 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c @@ -355,7 +355,7 @@ error_unmap_dma: 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; } |