Home
last modified time | relevance | path

Searched hist:"019 a316992ee0d9832b1c480c899d6bdf2a0a77e" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/core/
H A Drtnetlink.cdiff 019a316992ee0d9832b1c480c899d6bdf2a0a77e Wed Aug 09 13:41:49 CDT 2017 Florian Westphal <fw@strlen.de> 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>