summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 17:24:08 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 17:24:08 -0700
commit8800cea62025a5209d110c5fa5990429239d6eee (patch)
tree2aa9e4732d7014dcda4c0e80d2e377f52e2262e9 /net/ipv4/tcp_diag.c
parent84e48b6d64fdc29586bc7d9329f986cdae591a80 (diff)
parent14d50e78f947d340066ee0465dd892ad1d9162c0 (diff)
downloadblackbird-op-linux-8800cea62025a5209d110c5fa5990429239d6eee.tar.gz
blackbird-op-linux-8800cea62025a5209d110c5fa5990429239d6eee.zip
Merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git/
Diffstat (limited to 'net/ipv4/tcp_diag.c')
-rw-r--r--net/ipv4/tcp_diag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 313c1408da33..8faa8948f75c 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -777,8 +777,9 @@ static inline void tcpdiag_rcv_skb(struct sk_buff *skb)
static void tcpdiag_rcv(struct sock *sk, int len)
{
struct sk_buff *skb;
+ unsigned int qlen = skb_queue_len(&sk->sk_receive_queue);
- while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) {
+ while (qlen-- && (skb = skb_dequeue(&sk->sk_receive_queue))) {
tcpdiag_rcv_skb(skb);
kfree_skb(skb);
}
OpenPOWER on IntegriCloud