diff options
| author | Florian Westphal <[email protected]> | 2017-08-09 20:41:49 +0200 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-08-09 16:57:38 -0700 |
| commit | 019a316992ee0d9832b1c480c899d6bdf2a0a77e (patch) | |
| tree | 3a97790600c4e1a23ffce2d9376252704a3ee5aa /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | b97bac64a589d0158cf866e8995e831030f68f4f (diff) | |
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 <[email protected]>
Reviewed-by: Hannes Frederic Sowa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions