Skip to contentSkip to conversation

modules: Fix up build when CONFIG_MODULE_UNLOAD=n.

PATCH In review Paul Mundt 3 participants 6 messages Apr 9, 2009 – Apr 15, 2009 Linux-next tree

lore
Share & tools
lore

Paul Mundt

author
#0 lore raw

PATCH 1/1 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

---

 kernel/module.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/module.c +3 -3
index 274ab43..5fb0ece 100644
@@ -73,6 +73,9 @@ DEFINE_MUTEX(module_mutex);
 EXPORT_SYMBOL_GPL(module_mutex);
 static LIST_HEAD(modules);
 
+/* Block module loading/unloading? */
+int modules_disabled = 0;
+
 /* Waiting for a module to finish initializing? */
 static DECLARE_WAIT_QUEUE_HEAD(module_wq);
 
@@ -782,9 +785,6 @@ static void wait_for_zero_refcount(struct module *mod)
 	mutex_lock(&module_mutex);
 }
 
-/* Block module loading/unloading? */
-int modules_disabled = 0;
-
 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 		unsigned int, flags)
 {
author
#1 lore raw

This is still broken in today's -next..

Quoted 48 lines · Paul Mundt

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

---

 kernel/module.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/module.c +3 -4
index 274ab43..5fb0ece 100644
@@ -73,6 +73,9 @@ DEFINE_MUTEX(module_mutex);
 EXPORT_SYMBOL_GPL(module_mutex);
 static LIST_HEAD(modules);
 
+/* Block module loading/unloading? */
+int modules_disabled = 0;
+
 /* Waiting for a module to finish initializing? */
 static DECLARE_WAIT_QUEUE_HEAD(module_wq);
 
@@ -782,9 +785,6 @@ static void wait_for_zero_refcount(struct module *mod)
 	mutex_lock(&module_mutex);
 }
 
-/* Block module loading/unloading? */
-int modules_disabled = 0;
-
 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 		unsigned int, flags)
 {
--

To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 2 lines · On Tue, 14 Apr 2009 15:26:47 +0900 Paul Mundt <[email protected]> wrote:

This is still broken in today's -next..

James, can we have this fixed, please?

Paul, it would have been helpful if you had cc'd the Author and Committer of the bad commit (or if I had done so ...)

Original message below.

Signature · 29 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

Date:	Fri, 10 Apr 2009 00:49:44 +0900
From:	Paul Mundt <[email protected]>
To:	[email protected]
Subject: [PATCH -next] modules: Fix up build when CONFIG_MODULE_UNLOAD=n.
Message-ID: <[email protected]>

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 <[email protected]>

---

 kernel/module.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/module.c +3 -3
index 274ab43..5fb0ece 100644
@@ -73,6 +73,9 @@ DEFINE_MUTEX(module_mutex);
 EXPORT_SYMBOL_GPL(module_mutex);
 static LIST_HEAD(modules);
 
+/* Block module loading/unloading? */
+int modules_disabled = 0;
+
 /* Waiting for a module to finish initializing? */
 static DECLARE_WAIT_QUEUE_HEAD(module_wq);
 
@@ -782,9 +785,6 @@ static void wait_for_zero_refcount(struct module *mod)
 	mutex_lock(&module_mutex);
 }
 
-/* Block module loading/unloading? */
-int modules_disabled = 0;
-
 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 		unsigned int, flags)
 {
author
#3 lore raw
Quoted 9 lines · Stephen Rothwell
Quoted 2 lines · On Tue, 14 Apr 2009 15:26:47 +0900 Paul Mundt <[email protected]> wrote:

This is still broken in today's -next..

James, can we have this fixed, please?

Paul, it would have been helpful if you had cc'd the Author and Committer of the bad commit (or if I had done so ...)

Oh, I thought I had, I guess I was a bit too hasty with the the send button.. sorry about that!

#5 lore raw

Hi James,

Quoted 11 lines · On Wed, 15 Apr 2009 08:19:59 +1000 (EST) James Morris <[email protected]> wrote:
Quoted 5 lines · Stephen Rothwell
Quoted 2 lines · On Tue, 14 Apr 2009 15:26:47 +0900 Paul Mundt <[email protected]> wrote:

This is still broken in today's -next..

James, can we have this fixed, please?

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

Thanks.

Unfortunately, you applied it with me as the author instead of Paul ...

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/