mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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: 04b1d4e50e
("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>
This commit is contained in:
parent
9e2cf36d5c
commit
864150dfa3
4 changed files with 17 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
#define __NET_FIB_NOTIFIER_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <net/net_namespace.h>
|
||||
|
||||
|
@ -26,6 +27,7 @@ struct fib_notifier_ops {
|
|||
struct list_head list;
|
||||
unsigned int (*fib_seq_read)(struct net *net);
|
||||
int (*fib_dump)(struct net *net, struct notifier_block *nb);
|
||||
struct module *owner;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue