diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-05-02 18:10:06 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-06-14 16:37:27 -0700 |
commit | 81bdf5bd7349bd4523538cbd7878f334bc2bfe14 (patch) | |
tree | 8b12ba3191eca882d550369a7a4826a501a3b215 /include/linux | |
parent | 2c666df80764389886110c942a7916ba9622583d (diff) | |
download | op-kernel-dev-81bdf5bd7349bd4523538cbd7878f334bc2bfe14.zip op-kernel-dev-81bdf5bd7349bd4523538cbd7878f334bc2bfe14.tar.gz |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/if_bridge.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 938b7e8..d001d78 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -101,6 +101,9 @@ struct __fdb_entry { #include <linux/netdevice.h> +/* br_handle_frame_hook() needs the following forward declaration. */ +struct net_bridge_port; + extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *)); extern struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff *skb); |