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: 4895c771c7
("ipv4: Add FIB nexthop exceptions.")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
29abe2fda5
commit
caa415270c
@@ -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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user