mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
rtnetlink: get reference on module before invoking handlers
Add yet another rtnl_register function. It will be used by modules that can be removed. The passed module struct is used to prevent module unload while a netlink dump is in progress or when a DOIT_UNLOCKED doit callback is called. Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
addf9b90de
commit
e420251148
2 changed files with 80 additions and 35 deletions
|
@ -17,6 +17,8 @@ int __rtnl_register(int protocol, int msgtype,
|
|||
rtnl_doit_func, rtnl_dumpit_func, unsigned int flags);
|
||||
void rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func, unsigned int flags);
|
||||
int rtnl_register_module(struct module *owner, int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func, unsigned int flags);
|
||||
int rtnl_unregister(int protocol, int msgtype);
|
||||
void rtnl_unregister_all(int protocol);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue