public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix unix module
@ 2004-04-18  5:32 Rusty Russell
  2004-04-18  8:01 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Rusty Russell @ 2004-04-18  5:32 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: lkml - Kernel Mailing List

Linus, please apply.  I should never have accepted that damn "make
modpost create the struct module" patch during the stable series: this
is at least the third fix which had to go on top of it...

Name: Fix name of unix domain sockets module
Status: Tested on 2.6.6-rc1-bk2

# lsmod
Module                  Size  Used by
1                      26060  6 
#

The compiler #define's unix to 1: we use -DKBUILD_MODNAME=unix.  We
used to #undef unix at the top of af_unix.c, but now the name is
inserted by modpost, that doesn't help.

#undef unix in modpost.c's generated C file.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.6-rc1-bk2/net/unix/af_unix.c working-2.6.6-rc1-bk2-usermodehelper-thread/net/unix/af_unix.c
--- linux-2.6.6-rc1-bk2/net/unix/af_unix.c	2004-04-05 09:04:50.000000000 +1000
+++ working-2.6.6-rc1-bk2-usermodehelper-thread/net/unix/af_unix.c	2004-04-18 15:22:23.000000000 +1000
@@ -82,8 +82,6 @@
  *		  with BSD names.
  */
 
-#undef unix	/* KBUILD_MODNAME */
-
 #include <linux/module.h>
 #include <linux/config.h>
 #include <linux/kernel.h>
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.6.6-rc1-bk2/scripts/modpost.c working-2.6.6-rc1-bk2-usermodehelper-thread/scripts/modpost.c
--- linux-2.6.6-rc1-bk2/scripts/modpost.c	2004-04-15 16:06:55.000000000 +1000
+++ working-2.6.6-rc1-bk2-usermodehelper-thread/scripts/modpost.c	2004-04-18 15:22:07.000000000 +1000
@@ -487,6 +487,7 @@ add_header(struct buffer *b)
 	buf_printf(b, "\n");
 	buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
 	buf_printf(b, "\n");
+	buf_printf(b, "#undef unix\n"); /* We have a module called "unix" */
 	buf_printf(b, "struct module __this_module\n");
 	buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
 	buf_printf(b, " .name = __stringify(KBUILD_MODNAME),\n");


-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-18 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-18  5:32 [PATCH] Fix unix module Rusty Russell
2004-04-18  8:01 ` Russell King
2004-04-18 10:05   ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox