summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-04 02:24:08 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-04 02:24:08 +0200
commit8800cea62025a5209d110c5fa5990429239d6eee (patch)
tree2aa9e4732d7014dcda4c0e80d2e377f52e2262e9 /net/ipv4/tcp_diag.c
parentMerge of master.kernel.org:/home/rmk/linux-2.6-rmk.git (diff)
parent[PKT_SCHED]: Action repeat (diff)
downloadlinux-8800cea62025a5209d110c5fa5990429239d6eee.tar.xz
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);
}