]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita05333ddfc132d95424b1f648bc549702ba27f6e
treecd44cd81f85c3904340f5cef1a359e2ae97a0c20
parente9243152bcef783f53e81a80fc441d6738a38856
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: 6a83356234ec7 ("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