From: Changli Gao Date: Sat, 4 Dec 2010 14:09:08 +0000 (+0000) Subject: ifb: goto resched directly if error happens and dp->tq isn't empty X-Git-Tag: v2.6.34.9~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d5d2b57b92b386e4867d575c20f9fdc16bcbbc;p=thirdparty%2Fkernel%2Fstable.git ifb: goto resched directly if error happens and dp->tq isn't empty commit 75c1c82566f23dd539fb7ccbf57a1caa7ba82628 upstream If we break the loop when there are still skbs in tq and no skb in rq, the skbs will be left in txq until new skbs are enqueued into rq. In rare cases, no new skb is queued, then these skbs will stay in rq forever. After this patch, if tq isn't empty when we break the loop, we goto resched directly. Signed-off-by: Changli Gao Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller Signed-off-by: Paul Gortmaker --- diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index f4081c0a2d9c1..7f8276ef24742 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c @@ -104,6 +104,8 @@ static void ri_tasklet(unsigned long dev) rcu_read_unlock(); dev_kfree_skb(skb); stats->tx_dropped++; + if (skb_queue_len(&dp->tq) != 0) + goto resched; break; } rcu_read_unlock();