ipv4: fix a race in update_or_create_fnhe()
authorEric Dumazet <edumazet@google.com>
Thu, 4 Sep 2014 05:21:56 +0000 (22:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Sep 2014 00:15:50 +0000 (17:15 -0700)
commitcaa415270c732505240bb60171c44a7838c555e8
treecd44cd81f85c3904340f5cef1a359e2ae97a0c20
parent29abe2fda54f8e16ecff5d76d96325f31508d5ba
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>
include/net/ip_fib.h
net/ipv4/fib_semantics.c
net/ipv4/route.c