aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c8
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)
1865 kfree(mod->args); 1865 kfree(mod->args);
1866 percpu_modfree(mod); 1866 percpu_modfree(mod);
1867 1867
1868 /* Free lock-classes: */ 1868 /* Free lock-classes; relies on the preceding sync_rcu(). */
1869 lockdep_free_key_range(mod->module_core, mod->core_size); 1869 lockdep_free_key_range(mod->module_core, mod->core_size);
1870 1870
1871 /* Finally, free the core (containing the module structure) */ 1871 /* Finally, free the core (containing the module structure) */
@@ -3349,9 +3349,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
3349 module_bug_cleanup(mod); 3349 module_bug_cleanup(mod);
3350 mutex_unlock(&module_mutex); 3350 mutex_unlock(&module_mutex);
3351 3351
3352 /* Free lock-classes: */
3353 lockdep_free_key_range(mod->module_core, mod->core_size);
3354
3355 /* we can't deallocate the module until we clear memory protection */ 3352 /* we can't deallocate the module until we clear memory protection */
3356 unset_module_init_ro_nx(mod); 3353 unset_module_init_ro_nx(mod);
3357 unset_module_core_ro_nx(mod); 3354 unset_module_core_ro_nx(mod);
@@ -3375,6 +3372,9 @@ static int load_module(struct load_info *info, const char __user *uargs,
3375 synchronize_rcu(); 3372 synchronize_rcu();
3376 mutex_unlock(&module_mutex); 3373 mutex_unlock(&module_mutex);
3377 free_module: 3374 free_module:
3375 /* Free lock-classes; relies on the preceding sync_rcu() */
3376 lockdep_free_key_range(mod->module_core, mod->core_size);
3377
3378 module_deallocate(mod, info); 3378 module_deallocate(mod, info);
3379 free_copy: 3379 free_copy:
3380 free_copy(info); 3380 free_copy(info);