ipv4: fix a race in update_or_create_fnhe()

commit caa415270c upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Eric Dumazet 2014-09-03 22:21:56 -07:00 • committed by Ben Hutchings
commit 73bbb7ec88
3 changed files with 9 additions and 7 deletions