[IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache
authorEric Dumazet <dada1@cosmosbay.com>
Thu, 10 Jan 2008 11:55:57 +0000 (03:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jan 2008 11:55:57 +0000 (03:55 -0800)
commit0bcceadceb0907094ba4e40bf9a7cd9b080f13fb
tree6cec2343354c5a22107eb53da276ab744519033a
parent9cd40029423701c376391da59d2c6469672b4bed
[IPV4] ROUTE: fix rcu_dereference() uses in /proc/net/rt_cache

In rt_cache_get_next(), no need to guard seq->private by a
rcu_dereference() since seq is private to the thread running this
function. Reading seq.private once (as guaranted bu rcu_dereference())
or several time if compiler really is dumb enough wont change the
result.

But we miss real spots where rcu_dereference() are needed, both in
rt_cache_get_first() and rt_cache_get_next()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c