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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 21:58:28 +0000 (13:58 -0800)
commitb0460db42b29408661b089c477b81ddf2c5e39fd
tree17c15833bfb027d0fb9bcd3c9d66ab0802d3f72a
parentb5703e91bc18c166d8b97ee39902d6b9427f8cd1
ifb: goto resched directly if error happens and dp->tq isn't empty

[ Upstream commit 75c1c82566f23dd539fb7ccbf57a1caa7ba82628 ]

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: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/ifb.c