Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Oct 2014 17:24:26 +0000 (10:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Oct 2014 17:24:26 +0000 (10:24 -0700)
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

1  2 
kernel/module.c

diff --combined kernel/module.c
index 65586ffa0c9829ce0f75b21db76477ad5685c96f,138b83e31bd52851845f3bfe3e5f807dccf2afb4..88cec1ddb1e3c516496b951ae192cba21ff80c90
@@@ -1842,7 -1842,9 +1842,9 @@@ static void free_module(struct module *
  
        /* 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);
@@@ -3388,7 -3390,7 +3390,7 @@@ static inline int is_arm_mapping_symbol
  {
        if (str[0] == '.' && str[1] == 'L')
                return true;
 -      return str[0] == '$' && strchr("atd", str[1])
 +      return str[0] == '$' && strchr("axtd", str[1])
               && (str[2] == '\0' || str[2] == '.');
  }