net: Make accesses to ->br_port safe for sparse RCU
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 3 May 2010 01:10:06 +0000 (18:10 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 14 Jun 2010 23:37:27 +0000 (16:37 -0700)
commit81bdf5bd7349bd4523538cbd7878f334bc2bfe14
tree8b12ba3191eca882d550369a7a4826a501a3b215
parent2c666df80764389886110c942a7916ba9622583d
net: Make accesses to ->br_port safe for sparse RCU

The new versions of the rcu_dereference() APIs requires that any pointers
passed to one of these APIs be fully defined.  The ->br_port field
in struct net_device points to a struct net_bridge_port, which is an
incomplete type.  This commit therefore changes ->br_port to be a void*,
and introduces a br_port() helper function to convert the type to struct
net_bridge_port, and applies this new helper function where required.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: David Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
include/linux/if_bridge.h
net/bridge/br_fdb.c
net/bridge/br_private.h
net/bridge/netfilter/ebt_redirect.c
net/bridge/netfilter/ebt_ulog.c
net/bridge/netfilter/ebtables.c
net/netfilter/nfnetlink_log.c
net/netfilter/nfnetlink_queue.c