From: Alexander Duyck Date: Sun, 22 Oct 2017 01:12:29 +0000 (-0700) Subject: i40e: Add programming descriptors to cleaned_count X-Git-Tag: v4.1.12-124.31.3~442 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3d677a772a4564373754324f8b0ec80926e67a02;p=users%2Fjedix%2Flinux-maple.git i40e: Add programming descriptors to cleaned_count This patch updates the i40e driver to include programming descriptors in the cleaned_count. Without this change it becomes possible for us to leak memory as we don't trigger a large enough allocation when the time comes to allocate new buffers and we end up overwriting a number of rx_buffers equal to the number of programming descriptors we encountered. Fixes: 0e626ff7ccbf ("i40e: Fix support for flow director programming status") Signed-off-by: Alexander Duyck Tested-by: Anders K. Pedersen Signed-off-by: Jeff Kirsher (cherry picked from commit 62b4c6694dfd3821bd5ea5bed48238bbabd5fe8b) Orabug: 28228724 Signed-off-by: Honglei Wang Reviewed-by: Jack Vogel Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 433dc24a052e0..7a0e10dd4480f 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -1940,6 +1940,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget) if (unlikely(i40e_rx_is_programming_status(qword))) { i40e_clean_programming_status(rx_ring, rx_desc, qword); + cleaned_count++; continue; } size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>