tcp: fix listening_get_next()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 23 Dec 2010 17:32:46 +0000 (09:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Dec 2010 17:32:46 +0000 (09:32 -0800)
Alexey Vlasov found /proc/net/tcp could sometime loop and display
millions of sockets in LISTEN state.

In 2.6.29, when we converted TCP hash tables to RCU, we left two
sk_next() calls in listening_get_next().

We must instead use sk_nulls_next() to properly detect an end of chain.

Reported-by: Alexey Vlasov <renton@renton.name>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found