diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-02 17:17:46 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-04-02 17:17:46 +0200 |
commit | c2b078e78ace39710356a7bb6b984177d942a699 (patch) | |
tree | e9617aec87d9720e902ce1fca983a955a6104d40 /kernel/module.c | |
parent | perf/x86/intel/bts: Add BTS PMU driver (diff) | |
parent | perf/x86/intel: Fix Haswell CYCLE_ACTIVITY.* counter constraints (diff) | |
download | linux-c2b078e78ace39710356a7bb6b984177d942a699.tar.xz linux-c2b078e78ace39710356a7bb6b984177d942a699.zip |
Merge branch 'perf/urgent' into perf/core, before applying dependent patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c index b3d634ed06c9..99fdf94efce8 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1865,7 +1865,7 @@ static void free_module(struct module *mod) kfree(mod->args); percpu_modfree(mod); - /* Free lock-classes: */ + /* Free lock-classes; relies on the preceding sync_rcu(). */ lockdep_free_key_range(mod->module_core, mod->core_size); /* Finally, free the core (containing the module structure) */ @@ -3349,9 +3349,6 @@ static int load_module(struct load_info *info, const char __user *uargs, module_bug_cleanup(mod); mutex_unlock(&module_mutex); - /* Free lock-classes: */ - lockdep_free_key_range(mod->module_core, mod->core_size); - /* we can't deallocate the module until we clear memory protection */ unset_module_init_ro_nx(mod); unset_module_core_ro_nx(mod); @@ -3375,6 +3372,9 @@ static int load_module(struct load_info *info, const char __user *uargs, synchronize_rcu(); mutex_unlock(&module_mutex); free_module: + /* Free lock-classes; relies on the preceding sync_rcu() */ + lockdep_free_key_range(mod->module_core, mod->core_size); + module_deallocate(mod, info); free_copy: free_copy(info); |