mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
gro: Flush GRO packets in napi_disable_pending path
When NAPI is disabled while we're in net_rx_action, we end up calling __napi_complete without flushing GRO packets. This is a bug as it would cause the GRO packets to linger, of course it also literally BUGs to catch error like this :) This patch changes it to napi_complete, with the obligatory IRQ reenabling. This should be safe because we've only just disabled IRQs and it does not materially affect the test conditions in between. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
71f9dacd2e
commit
ff780cd8f2
1 changed files with 5 additions and 3 deletions
|
@ -2823,9 +2823,11 @@ static void net_rx_action(struct softirq_action *h)
|
|||
* move the instance around on the list at-will.
|
||||
*/
|
||||
if (unlikely(work == weight)) {
|
||||
if (unlikely(napi_disable_pending(n)))
|
||||
__napi_complete(n);
|
||||
else
|
||||
if (unlikely(napi_disable_pending(n))) {
|
||||
local_irq_enable();
|
||||
napi_complete(n);
|
||||
local_irq_disable();
|
||||
} else
|
||||
list_move_tail(&n->poll_list, list);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue