Florian Westphal 019a316992 rtnetlink: add reference counting to prevent module unload while dump is in progress
I don't see what prevents rmmod (unregister_all is called) while a dump
is active.

Even if we'd add rtnl lock/unlock pair to unregister_all (as done here),
thats not enough either as rtnl_lock is released right before the dump
process starts.

So this adds a refcount:
 * acquire rtnl mutex
 * bump refcount
 * release mutex
 * start the dump

... and make unregister_all remove the callbacks (no new dumps possible)
and then wait until refcount is 0.

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-09 16:57:38 -07:00
..
2017-04-12 22:02:40 +02:00
2017-08-01 15:26:19 -07:00
2017-07-18 11:13:41 -07:00
2017-08-01 15:26:19 -07:00
2017-07-21 16:26:01 -07:00
2017-08-03 09:13:51 -07:00
2017-06-15 12:12:40 -04:00
2017-06-15 12:12:40 -04:00