rtnetlink: get reference on module before invoking handlers
authorFlorian Westphal <fw@strlen.de>
Sat, 2 Dec 2017 20:44:06 +0000 (21:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Dec 2017 16:32:31 +0000 (11:32 -0500)
commite4202511480da5f8e6870d8f6ecbb821aeaa8caf
treee5fadf5d76149f543fc003154f844b2ca19579bd
parentaddf9b90de22f7aaad0db39bccb5d51ac47dd4e1
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>
include/net/rtnetlink.h
net/core/rtnetlink.c