Re: 2.6.36.2 - loop on read /proc/net/tcp

From: David Miller
Date: Thu Dec 23 2010 - 12:32:47 EST


From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Thu, 23 Dec 2010 06:07:26 +0100

> [PATCH] tcp: fix listening_get_next()
>
> 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@xxxxxxxxxxx>
> Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>

Applied, thanks everyone.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/