Skip to contentSkip to conversation

configs: Include MODULE_*() when CONFIG_IKCONFIG_PROC=n

PATCH In review Stephen Boyd 3 participants 3 messages Jun 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: Include MODULE_*() when CONFIG_IKCONFIG_PROC=n

If CONFIG_IKCONFIG=m but CONFIG_IKCONFIG_PROC=n we get a module that has no MODULE_LICENSE definition. Move the MODULE_*() definitions outside the CONFIG_IKCONFIG_PROC #ifdef to prevent this configuration from tainting the kernel.

---
 kernel/configs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/configs.c +2 -2
index b4066b4..42e8fa0 100644
@@ -92,8 +92,8 @@ static void __exit ikconfig_cleanup(void)
 module_init(ikconfig_init);
 module_exit(ikconfig_cleanup);
 
+#endif /* CONFIG_IKCONFIG_PROC */
+
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Randy Dunlap");
 MODULE_DESCRIPTION("Echo the kernel .config file used to build the kernel");
-
-#endif /* CONFIG_IKCONFIG_PROC */
Signature · 1 line
1.7.5.rc2.4.g4d8b3
Acked-by on v1 1/1
#2 lore raw
In reply to Stephen Boyd
Quoted 7 lines · On Mon, 20 Jun 2011 23:12:27 -0700 Stephen Boyd wrote:

If CONFIG_IKCONFIG=m but CONFIG_IKCONFIG_PROC=n we get a module that has no MODULE_LICENSE definition. Move the MODULE_*() definitions outside the CONFIG_IKCONFIG_PROC #ifdef to prevent this configuration from tainting the kernel.

Thanks.

Quoted 10 lines
---
 kernel/configs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/configs.c +0 -0
index b4066b4..42e8fa0 100644

kernel/configs.c static void __exit ikconfig_cleanup(void) · line 99

Quoted 10 lines
kernel/configs.c +2 -2
@@ -92,8 +92,8 @@ static void __exit ikconfig_cleanup(void)
 module_init(ikconfig_init);
 module_exit(ikconfig_cleanup);
 
+#endif /* CONFIG_IKCONFIG_PROC */
+
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Randy Dunlap");
 MODULE_DESCRIPTION("Echo the kernel .config file used to build the kernel");
-
-#endif /* CONFIG_IKCONFIG_PROC */

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***