Merge tag 'for-linus-20141006' of git://github.com/sctscore/linux-off
[cascardo/linux.git] / kernel / module.c
index 6f69463..65586ff 100644 (file)
@@ -135,7 +135,7 @@ static int param_set_bool_enable_only(const char *val,
 }
 
 static const struct kernel_param_ops param_ops_bool_enable_only = {
-       .flags = KERNEL_PARAM_FL_NOARG,
+       .flags = KERNEL_PARAM_OPS_FL_NOARG,
        .set = param_set_bool_enable_only,
        .get = param_get_bool,
 };
@@ -3304,6 +3304,11 @@ static int load_module(struct load_info *info, const char __user *uargs,
        mutex_lock(&module_mutex);
        module_bug_cleanup(mod);
        mutex_unlock(&module_mutex);
+
+       /* we can't deallocate the module until we clear memory protection */
+       unset_module_init_ro_nx(mod);
+       unset_module_core_ro_nx(mod);
+
  ddebug_cleanup:
        dynamic_debug_remove(info->debug);
        synchronize_sched();
@@ -3383,7 +3388,7 @@ static inline int is_arm_mapping_symbol(const char *str)
 {
        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] == '.');
 }