Pull modules updates from Jessica Yu: "Summary of modules changes for the 4.14 merge window: - minor code cleanups and fixes - modpost: avoid building modules that have names that exceed the size of the name field in struct module" * tag 'modules-for-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: Remove const attribute from alias for MODULE_DEVICE_TABLE module: fix ddebug_remove_module() modpost: abort if module name is too long
Showing the changes to kernel (1 of 3 files). Show all
Unified · Split
| @@ -2707,21 +2707,21 @@ static void add_kallsyms(struct module *mod, const struct load_info *info) · 2706 unmodified lines | |||
| 2707 | } | 2707 | } |
| 2708 | #endif /* CONFIG_KALLSYMS */ | 2708 | #endif /* CONFIG_KALLSYMS */ |
| 2709 | 2709 | ||
| 2710 | static void dynamic_debug_setup(struct _ddebug *debug, unsigned int num) | 2710 | static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug, unsigned int num) |
| 2711 | { | 2711 | { |
| 2712 | if (!debug) | 2712 | if (!debug) |
| 2713 | return; | 2713 | return; |
| 2714 | #ifdef CONFIG_DYNAMIC_DEBUG | 2714 | #ifdef CONFIG_DYNAMIC_DEBUG |
| 2715 | if (ddebug_add_module(debug, num, debug->modname)) | 2715 | if (ddebug_add_module(debug, num, mod->name)) |
| 2716 | pr_err("dynamic debug error adding module: %s\n", | 2716 | pr_err("dynamic debug error adding module: %s\n", |
| 2717 | debug->modname); | 2717 | debug->modname); |
| 2718 | #endif | 2718 | #endif |
| 2719 | } | 2719 | } |
| 2720 | 2720 | ||
| 2721 | static void dynamic_debug_remove(struct _ddebug *debug) | 2721 | static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug) |
| 2722 | { | 2722 | { |
| 2723 | if (debug) | 2723 | if (debug) |
| 2724 | ddebug_remove_module(debug->modname); | 2724 | ddebug_remove_module(mod->name); |
| 2725 | } | 2725 | } |
| 2726 | 2726 | ||
| 2727 | void * __weak module_alloc(unsigned long size) | 2727 | void * __weak module_alloc(unsigned long size) |
| @@ -3715,7 +3715,7 @@ static int load_module(struct load_info *info, const char __user *uargs, · 987 unmodified lines | |||
| 3715 | goto free_arch_cleanup; | 3715 | goto free_arch_cleanup; |
| 3716 | } | 3716 | } |
| 3717 | 3717 | ||
| 3718 | dynamic_debug_setup(info->debug, info->num_debug); | 3718 | dynamic_debug_setup(mod, info->debug, info->num_debug); |
| 3719 | 3719 | ||
| 3720 | /* Ftrace init must be called in the MODULE_STATE_UNFORMED state */ | 3720 | /* Ftrace init must be called in the MODULE_STATE_UNFORMED state */ |
| 3721 | ftrace_module_init(mod); | 3721 | ftrace_module_init(mod); |
| @@ -3779,7 +3779,7 @@ static int load_module(struct load_info *info, const char __user *uargs, · 57 unmodified lines | |||
| 3779 | module_disable_nx(mod); | 3779 | module_disable_nx(mod); |
| 3780 | 3780 | ||
| 3781 | ddebug_cleanup: | 3781 | ddebug_cleanup: |
| 3782 | dynamic_debug_remove(info->debug); | 3782 | dynamic_debug_remove(mod, info->debug); |
| 3783 | synchronize_sched(); | 3783 | synchronize_sched(); |
| 3784 | kfree(mod->args); | 3784 | kfree(mod->args); |
| 3785 | free_arch_cleanup: | 3785 | free_arch_cleanup: |