aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNeilBrown <[email protected]>2017-12-18 12:13:20 +1100
committerGreg Kroah-Hartman <[email protected]>2018-01-08 16:03:44 +0100
commitd487fe31f49e78f3cdd826923bf0c340a839ffd8 (patch)
treeeeb88828bdaffd84f114f6174c89e205edc40adf /tools/perf/scripts/python
parent7dc2155195586ec75f53d6dcd381f935ccc35d02 (diff)
staging: lustre: obd_mount: fix possible race with module unload.
lustre_fill_super() calls client_fill_super() without holding a reference to the module containing client_fill_super. If that module is unloaded at a bad time, this can crash. To be able to get a reference to the module using try_get_module(), we need a pointer to the module. So replace lustre_register_client_fill_super() and lustre_register_kill_super_cb() with a single lustre_register_super_ops() which also passed a module pointer. Then use a spinlock to ensure the module pointer isn't removed while try_module_get() is running, and use try_module_get() to ensure we have a reference before calling client_fill_super(). Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions