History

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

Linus Torvalds committed 12 years ago

Commit 50edb5c2 parents ad3118b d3051b41 file · +2 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/module.c+2−0
@@ -1842,7 +1842,9 @@ static void free_module(struct module *mod) · 1841 unmodified lines
18421842
18431843 /* We leave it in list to prevent duplicate loads, but make sure
18441844 * that noone uses it while it's being deconstructed. */
1845+ mutex_lock(&module_mutex);
18451846 mod->state = MODULE_STATE_UNFORMED;
1847+ mutex_unlock(&module_mutex);
18461848
18471849 /* Remove dynamic debug info */
18481850 ddebug_remove_module(mod->name);