kernel-ark/net/ipv4
Herbert Xu 1371e37da2 [IPV4]: Kill redundant rcu_dereference on fa_info
This patch kills a redundant rcu_dereference on fa->fa_info in fib_trie.c.
As this dereference directly follows a list_for_each_entry_rcu line, we
have already taken a read barrier with respect to getting an entry from
the list.

This read barrier guarantees that all values read out of fa are valid.
In particular, the contents of structure pointed to by fa->fa_info is
initialised before fa->fa_info is actually set (see fn_trie_insert);
the setting of fa->fa_info itself is further separated with a write
barrier from the insertion of fa into the list.

Therefore by taking a read barrier after obtaining fa from the list
(which is given by list_for_each_entry_rcu), we can be sure that
fa->fa_info contains a valid pointer, as well as the fact that the
data pointed to by fa->fa_info is itself valid.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2005-10-26 00:25:03 -02:00
..
ipvs
netfilter [NETFILTER] ip_conntrack: Make "hashsize" conntrack parameter writable 2005-10-26 00:19:27 -02:00
af_inet.c
ah4.c
arp.c
datagram.c
devinet.c
esp4.c [IPSEC] Fix block size/MTU bugs in ESP 2005-10-10 21:11:34 -07:00
fib_frontend.c
fib_hash.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c [IPV4]: Kill redundant rcu_dereference on fa_info 2005-10-26 00:25:03 -02:00
icmp.c [NET]: Wider use of for_each_*cpu() 2005-10-25 23:54:01 -02:00
igmp.c
inet_connection_sock.c
inet_diag.c
inet_hashtables.c
inet_timewait_sock.c [TWSK]: Grab the module refcount for timewait sockets 2005-10-10 21:25:23 -07:00
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c
ip_input.c
ip_options.c
ip_output.c [SK_BUFF]: ipvs_property field must be copied 2005-10-22 17:06:01 -02:00
ip_sockglue.c
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
Kconfig
Makefile
multipath_drr.c
multipath_random.c
multipath_rr.c
multipath_wrandom.c
multipath.c
netfilter.c
proc.c [NET]: Wider use of for_each_*cpu() 2005-10-25 23:54:01 -02:00
protocol.c
raw.c
route.c
syncookies.c
sysctl_net_ipv4.c
tcp_bic.c
tcp_cong.c
tcp_diag.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_input.c
tcp_ipv4.c
tcp_minisocks.c
tcp_output.c [TCP] Allow len == skb->len in tcp_fragment 2005-10-20 17:13:13 -02:00
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_westwood.c
tcp.c
udp.c
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c