diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-05-03 18:30:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-05-03 18:30:05 -0400 |
commit | 09e14305982efc2f3b509d3c50ef5dcbff64a998 (patch) | |
tree | 7829c8b212a84e793ebf2d5bd0ceb68283c7b79e /net/decnet | |
parent | 2a0a6ebee1d68552152ae8d4aeda91d806995dec (diff) |
[NETLINK]: Fix infinite loops in synchronous netlink changes.
The qlen should continue to decrement, even if we
pop partially processed SKBs back onto the receive queue.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/netfilter/dn_rtmsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index 101ddef9ba9a..284a9998e53d 100644 --- a/net/decnet/netfilter/dn_rtmsg.c +++ b/net/decnet/netfilter/dn_rtmsg.c | |||
@@ -121,7 +121,7 @@ static void dnrmg_receive_user_sk(struct sock *sk, int len) | |||
121 | struct sk_buff *skb; | 121 | struct sk_buff *skb; |
122 | unsigned int qlen = skb_queue_len(&sk->sk_receive_queue); | 122 | unsigned int qlen = skb_queue_len(&sk->sk_receive_queue); |
123 | 123 | ||
124 | while (qlen-- && (skb = skb_dequeue(&sk->sk_receive_queue))) { | 124 | for (; qlen && (skb = skb_dequeue(&sk->sk_receive_queue)); qlen--) { |
125 | dnrmg_receive_user_skb(skb); | 125 | dnrmg_receive_user_skb(skb); |
126 | kfree_skb(skb); | 126 | kfree_skb(skb); |
127 | } | 127 | } |