Skip to content

Commit

Permalink
Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/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
  • Loading branch information
torvalds committed Oct 18, 2014
2 parents ad3118b + d3051b4 commit 50edb5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,9 @@ static void free_module(struct module *mod)

/* We leave it in list to prevent duplicate loads, but make sure
* that noone uses it while it's being deconstructed. */
mutex_lock(&module_mutex);
mod->state = MODULE_STATE_UNFORMED;
mutex_unlock(&module_mutex);

/* Remove dynamic debug info */
ddebug_remove_module(mod->name);
Expand Down

0 comments on commit 50edb5c

Please sign in to comment.