aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-03-17 13:11:29 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-17 13:11:29 -0700
commit303c6a0251852ecbdc5c15e466dcaff5971f7517 (patch)
treec75ff5ae3238d54e1dea0813bf3177a11faf0dd0 /net
parentr8169: revert "r8169: read MAC address from EEPROM on init (2nd attempt)" (diff)
downloadlinux-dev-303c6a0251852ecbdc5c15e466dcaff5971f7517.tar.xz
linux-dev-303c6a0251852ecbdc5c15e466dcaff5971f7517.zip
gro: Fix legacy path napi_complete crash
On the legacy netif_rx path, I incorrectly tried to optimise the napi_complete call by using __napi_complete before we reenable IRQs. This simply doesn't work since we need to flush the held GRO packets first. This patch fixes it by doing the obvious thing of reenabling IRQs first and then calling napi_complete. Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f1129706ce7b..2565f6d1d661 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2588,9 +2588,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
local_irq_disable();
skb = __skb_dequeue(&queue->input_pkt_queue);
if (!skb) {
- __napi_complete(napi);
local_irq_enable();
- break;
+ napi_complete(napi);
+ goto out;
}
local_irq_enable();
@@ -2599,6 +2599,7 @@ static int process_backlog(struct napi_struct *napi, int quota)
napi_gro_flush(napi);
+out:
return work;
}