]> git.baikalelectronics.ru Git - kernel.git/commit
net: ena: xdp: XDP_TX: fix memory leak
authorSameeh Jubran <sameehj@amazon.com>
Wed, 3 Jun 2020 08:50:22 +0000 (08:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2020 22:43:01 +0000 (15:43 -0700)
commitefbe32963db653c111627ce792388148f32b1677
tree06fdfec7abba760b49b7f75740e9ddef5b90a697
parent0163d421f42e6e2892c1b1e83726988a76468308
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: 27938dd2da07 ("net: ena: Implement XDP_TX action")
Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amazon/ena/ena_netdev.c