From a3372956a7aff295a1a71111d16316d27f9b72b1 Mon Sep 17 00:00:00 2001 From: Michael Blizek Date: Mon, 27 Jun 2011 06:35:53 +0200 Subject: [PATCH] drain_ooo_queue bugfix --- net/cor/rcv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/cor/rcv.c b/net/cor/rcv.c index 6195b797543..ac1fa865e14 100644 --- a/net/cor/rcv.c +++ b/net/cor/rcv.c @@ -697,13 +697,10 @@ void reset_ooo_queue(struct conn *src_in_l) #warning todo overlapping seqno rcv void drain_ooo_queue(struct conn *src_in_l) { - struct sk_buff *skb; - BUG_ON(src_in_l->sourcetype != SOURCE_IN); - skb = src_in_l->source.in.reorder_queue.next; - - while ((void *) skb != (void *) &(src_in_l->source.in.reorder_queue)) { + while (skb_queue_empty(&(src_in_l->source.in.reorder_queue)) == 0) { + struct sk_buff *skb = src_in_l->source.in.reorder_queue.next; skb_unlink(skb, &(src_in_l->source.in.reorder_queue)); kfree_skb(skb); src_in_l->source.in.ooo_packets--; -- 2.11.4.GIT