* [PATCH] config.gz doesn't need module_exit
@ 2006-09-16 22:11 Randy.Dunlap
2006-09-17 5:24 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2006-09-16 22:11 UTC (permalink / raw)
To: lkml, akpm; +Cc: adobriyan, rossb
From: Randy Dunlap <rdunlap@xenotime.net>
This is an alternative patch to the current /proc/config.gz
'module' patch from Ross. Pointed out by Alexey.
/proc/config.gz handler doesn't need module_exit() since it
isn't built as a module and the exit function won't be used
when the code is built into the kernel.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
kernel/configs.c | 9 ---------
1 files changed, 9 deletions(-)
--- linux-2618-rc7work.orig/kernel/configs.c
+++ linux-2618-rc7work/kernel/configs.c
@@ -99,16 +99,7 @@ static int __init ikconfig_init(void)
return 0;
}
-/***************************************************/
-/* ikconfig_cleanup: clean up our mess */
-
-static void __exit ikconfig_cleanup(void)
-{
- remove_proc_entry("config.gz", &proc_root);
-}
-
module_init(ikconfig_init);
-module_exit(ikconfig_cleanup);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Randy Dunlap");
---
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] config.gz doesn't need module_exit
2006-09-16 22:11 [PATCH] config.gz doesn't need module_exit Randy.Dunlap
@ 2006-09-17 5:24 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2006-09-17 5:24 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: lkml, adobriyan, rossb
On Sat, 16 Sep 2006 15:11:22 -0700
"Randy.Dunlap" <rdunlap@xenotime.net> wrote:
> From: Randy Dunlap <rdunlap@xenotime.net>
>
> This is an alternative patch to the current /proc/config.gz
> 'module' patch from Ross. Pointed out by Alexey.
>
> /proc/config.gz handler doesn't need module_exit() since it
> isn't built as a module and the exit function won't be used
> when the code is built into the kernel.
It doesn't buy us much though - the __exit code is all freed up
at runtime.
Or it should be. arch/i386/kernel/vmlinux.lds.S says
/* .exit.text is discard at runtime, not link time, to deal with references
from .altinstructions and .eh_frame */
but free_initmem() doesn't free it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-17 5:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-16 22:11 [PATCH] config.gz doesn't need module_exit Randy.Dunlap
2006-09-17 5:24 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®