aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 6e1ab1e34b2e..75b6d33b5292 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -626,14 +626,13 @@ static void rtnetlink_rcv(struct sock *sk, int len)
626 if (qlen > skb_queue_len(&sk->sk_receive_queue)) 626 if (qlen > skb_queue_len(&sk->sk_receive_queue))
627 qlen = skb_queue_len(&sk->sk_receive_queue); 627 qlen = skb_queue_len(&sk->sk_receive_queue);
628 628
629 while (qlen--) { 629 for (; qlen; qlen--) {
630 skb = skb_dequeue(&sk->sk_receive_queue); 630 skb = skb_dequeue(&sk->sk_receive_queue);
631 if (rtnetlink_rcv_skb(skb)) { 631 if (rtnetlink_rcv_skb(skb)) {
632 if (skb->len) { 632 if (skb->len)
633 skb_queue_head(&sk->sk_receive_queue, 633 skb_queue_head(&sk->sk_receive_queue,
634 skb); 634 skb);
635 qlen++; 635 else
636 } else
637 kfree_skb(skb); 636 kfree_skb(skb);
638 break; 637 break;
639 } 638 }