From: Ido Schimmel Date: Sat, 3 Dec 2016 15:45:05 +0000 (+0100) Subject: ipv4: fib: Convert FIB notification chain to be atomic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3f706f68e2fd93f1172fe7fd6f16ba70cc52b31;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ipv4: fib: Convert FIB notification chain to be atomic In order not to hold RTNL for long periods of time we're going to dump the FIB tables using RCU. Convert the FIB notification chain to be atomic, as we can't block in RCU critical sections. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 026f309c51e9..9bfce0df20dc 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -84,17 +84,17 @@ #include #include "fib_lookup.h" -static BLOCKING_NOTIFIER_HEAD(fib_chain); +static ATOMIC_NOTIFIER_HEAD(fib_chain); int register_fib_notifier(struct notifier_block *nb) { - return blocking_notifier_chain_register(&fib_chain, nb); + return atomic_notifier_chain_register(&fib_chain, nb); } EXPORT_SYMBOL(register_fib_notifier); int unregister_fib_notifier(struct notifier_block *nb) { - return blocking_notifier_chain_unregister(&fib_chain, nb); + return atomic_notifier_chain_unregister(&fib_chain, nb); } EXPORT_SYMBOL(unregister_fib_notifier); @@ -102,7 +102,7 @@ int call_fib_notifiers(struct net *net, enum fib_event_type event_type, struct fib_notifier_info *info) { info->net = net; - return blocking_notifier_call_chain(&fib_chain, event_type, info); + return atomic_notifier_call_chain(&fib_chain, event_type, info); } static int call_fib_entry_notifiers(struct net *net,