ifb: goto resched directly if error happens and dp->tq isn't empty
authorChangli Gao <xiaosuo@gmail.com>
Sat, 4 Dec 2010 14:09:08 +0000 (14:09 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 17 Apr 2011 20:16:04 +0000 (16:16 -0400)
commite2d5d2b57b92b386e4867d575c20f9fdc16bcbbc
tree111a0c11931a891fd79346e678b9738b23e533c4
parent7742df2151c0a78b58f710bbbc2de61616821dd6
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 <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/net/ifb.c