summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-26 01:22:01 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-26 01:22:01 -0700
commitf0de70f8bb56952f6e016a65a8a8d006918f5bf6 (patch)
tree1d38f828b212adc0a0f2d100d58544979fab543d /net/ipv4/udp.c
parentbb3daa4a5960cd9d39bad88679fcf587b456c05d (diff)
parentcda6d377ec6b2ee2e58d563d0bd7eb313e0165df (diff)
downloadop-kernel-dev-f0de70f8bb56952f6e016a65a8a8d006918f5bf6.zip
op-kernel-dev-f0de70f8bb56952f6e016a65a8a8d006918f5bf6.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index ace2ac8..bda08a0 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1618,7 +1618,8 @@ static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk)
} while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != state->family));
if (!sk) {
- spin_unlock_bh(&state->udp_table->hash[state->bucket].lock);
+ if (state->bucket < UDP_HTABLE_SIZE)
+ spin_unlock_bh(&state->udp_table->hash[state->bucket].lock);
return udp_get_first(seq, state->bucket + 1);
}
return sk;
@@ -1636,6 +1637,9 @@ static struct sock *udp_get_idx(struct seq_file *seq, loff_t pos)
static void *udp_seq_start(struct seq_file *seq, loff_t *pos)
{
+ struct udp_iter_state *state = seq->private;
+ state->bucket = UDP_HTABLE_SIZE;
+
return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN;
}
OpenPOWER on IntegriCloud