diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2015-03-05 02:02:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-05 07:35:18 +0300 |
commit | a7e53531234dc206bb75abb5305a72665dd4d75d (patch) | |
tree | 015a31ddf3a8d54491a04549adf3e3471dbb8943 /include/net/netns | |
parent | 41b489fd6ce03e96e90fcffdb69b168065ae2e40 (diff) | |
download | linux-a7e53531234dc206bb75abb5305a72665dd4d75d.tar.xz |
fib_trie: Make fib_table rcu safe
The fib_table was wrapped in several places with an
rcu_read_lock/rcu_read_unlock however after looking over the code I found
several spots where the tables were being accessed as just standard
pointers without any protections. This change fixes that so that all of
the proper protections are in place when accessing the table to take RCU
replacement or removal of the table into account.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/ipv4.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 1b26c6c3fd7c..db1db158a00e 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -7,6 +7,7 @@ #include <linux/uidgid.h> #include <net/inet_frag.h> +#include <linux/rcupdate.h> struct tcpm_hash_bucket; struct ctl_table_header; @@ -38,9 +39,9 @@ struct netns_ipv4 { #ifdef CONFIG_IP_MULTIPLE_TABLES struct fib_rules_ops *rules_ops; bool fib_has_custom_rules; - struct fib_table *fib_local; - struct fib_table *fib_main; - struct fib_table *fib_default; + struct fib_table __rcu *fib_local; + struct fib_table __rcu *fib_main; + struct fib_table __rcu *fib_default; #endif #ifdef CONFIG_IP_ROUTE_CLASSID int fib_num_tclassid_users; |