summaryrefslogtreecommitdiffstats
path: root/include/net/ip_fib.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-09-03 22:21:56 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-05 17:15:50 -0700
commitcaa415270c732505240bb60171c44a7838c555e8 (patch)
treecd44cd81f85c3904340f5cef1a359e2ae97a0c20 /include/net/ip_fib.h
parent29abe2fda54f8e16ecff5d76d96325f31508d5ba (diff)
downloadop-kernel-dev-caa415270c732505240bb60171c44a7838c555e8.zip
op-kernel-dev-caa415270c732505240bb60171c44a7838c555e8.tar.gz
ipv4: fix a race in update_or_create_fnhe()
nh_exceptions is effectively used under rcu, but lacks proper barriers. Between kzalloc() and setting of nh->nh_exceptions(), we need a proper memory barrier. Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: 4895c771c7f00 ("ipv4: Add FIB nexthop exceptions.") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip_fib.h')
-rw-r--r--include/net/ip_fib.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 9922093..f30fd55 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -87,7 +87,7 @@ struct fib_nh {
int nh_saddr_genid;
struct rtable __rcu * __percpu *nh_pcpu_rth_output;
struct rtable __rcu *nh_rth_input;
- struct fnhe_hash_bucket *nh_exceptions;
+ struct fnhe_hash_bucket __rcu *nh_exceptions;
};
/*
OpenPOWER on IntegriCloud