diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 13:24:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 13:24:26 -0400 |
commit | 50edb5cc22c7b2ea7df095913596e5a649bd6b41 (patch) | |
tree | 7d17ab844b3e91dabc0ea862d7c94624e25e8bd6 /kernel | |
parent | ad3118b9861379e3a77883613369cb967ffac26a (diff) | |
parent | d3051b489aa81ca9ba62af366149ef42b8dae97c (diff) |
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module fix from Rusty Russell:
"A single panic fix for a rare race, stable CC'd"
* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
modules, lock around setting of MODULE_STATE_UNFORMED
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 65586ffa0c98..88cec1ddb1e3 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1842,7 +1842,9 @@ static void free_module(struct module *mod) | |||
1842 | 1842 | ||
1843 | /* We leave it in list to prevent duplicate loads, but make sure | 1843 | /* We leave it in list to prevent duplicate loads, but make sure |
1844 | * that noone uses it while it's being deconstructed. */ | 1844 | * that noone uses it while it's being deconstructed. */ |
1845 | mutex_lock(&module_mutex); | ||
1845 | mod->state = MODULE_STATE_UNFORMED; | 1846 | mod->state = MODULE_STATE_UNFORMED; |
1847 | mutex_unlock(&module_mutex); | ||
1846 | 1848 | ||
1847 | /* Remove dynamic debug info */ | 1849 | /* Remove dynamic debug info */ |
1848 | ddebug_remove_module(mod->name); | 1850 | ddebug_remove_module(mod->name); |