Commit 19e4529ee7345079eeacc8e40cf69a304a64dc23
Committed by
James Morris
1 parent
ecfcc53fef
Exists in
master
and in
20 other branches
modules: Fix up build when CONFIG_MODULE_UNLOAD=n.
Commit 3d43321b7015387cfebbe26436d0e9d299162ea1 ("modules: sysctl to block module loading") introduces a modules_disabled variable that is only defined if CONFIG_MODULE_UNLOAD is enabled, despite being used in other places. This moves it up and fixes up the build. CC kernel/module.o kernel/module.c: In function 'sys_init_module': kernel/module.c:2401: error: 'modules_disabled' undeclared (first use in this function) kernel/module.c:2401: error: (Each undeclared identifier is reported only once kernel/module.c:2401: error: for each function it appears in.) make[1]: *** [kernel/module.o] Error 1 make: *** [kernel/module.o] Error 2 Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: James Morris <jmorris@namei.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
kernel/module.c
... | ... | @@ -71,6 +71,9 @@ |
71 | 71 | static DEFINE_MUTEX(module_mutex); |
72 | 72 | static LIST_HEAD(modules); |
73 | 73 | |
74 | +/* Block module loading/unloading? */ | |
75 | +int modules_disabled = 0; | |
76 | + | |
74 | 77 | /* Waiting for a module to finish initializing? */ |
75 | 78 | static DECLARE_WAIT_QUEUE_HEAD(module_wq); |
76 | 79 | |
... | ... | @@ -777,9 +780,6 @@ |
777 | 780 | current->state = TASK_RUNNING; |
778 | 781 | mutex_lock(&module_mutex); |
779 | 782 | } |
780 | - | |
781 | -/* Block module loading/unloading? */ | |
782 | -int modules_disabled = 0; | |
783 | 783 | |
784 | 784 | SYSCALL_DEFINE2(delete_module, const char __user *, name_user, |
785 | 785 | unsigned int, flags) |