]> git.baikalelectronics.ru Git - kernel.git/commit
net: Add module reference to FIB notifiers
authorIdo Schimmel <idosch@mellanox.com>
Fri, 1 Sep 2017 09:15:17 +0000 (12:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Sep 2017 03:33:42 +0000 (20:33 -0700)
commit6f5181316cdd48a825c60a7a48a1215a6ebf5a9a
tree1842a544d57e122936518563863aae60f712aa8a
parentd22438c53f26a84e2fa53e16be0308accee4a518
net: Add module reference to FIB notifiers

When a listener registers to the FIB notification chain it receives a
dump of the FIB entries and rules from existing address families by
invoking their dump operations.

While we call into these modules we need to make sure they aren't
removed. Do that by increasing their reference count before invoking
their dump operations and decrease it afterwards.

Fixes: d58988fa3ad9 ("net: core: Make the FIB notification chain generic")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/fib_notifier.h
net/core/fib_notifier.c
net/ipv4/fib_notifier.c
net/ipv6/fib6_notifier.c