* [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
@ 2006-03-24 0:08 Adrian Bunk
2006-03-24 0:13 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2006-03-24 0:08 UTC (permalink / raw)
To: Jing Min Zhao; +Cc: netdev, netfilter-devel, linux-kernel
EXPORT_SYMBOL'ed functions shouldn't be static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.16-mm1-full/net/ipv4/netfilter/ip_conntrack_helper_h323.c.old 2006-03-23 19:29:58.000000000 +0100
+++ linux-2.6.16-mm1-full/net/ipv4/netfilter/ip_conntrack_helper_h323.c 2006-03-23 19:30:39.000000000 +0100
@@ -639,8 +639,8 @@
}
/****************************************************************************/
-static int get_h225_addr(unsigned char *data, TransportAddress * addr,
- u_int32_t * ip, u_int16_t * port)
+int get_h225_addr(unsigned char *data, TransportAddress * addr,
+ u_int32_t * ip, u_int16_t * port)
{
unsigned char *p;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
2006-03-24 0:08 [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static Adrian Bunk
@ 2006-03-24 0:13 ` David S. Miller
2006-03-24 0:29 ` Adrian Bunk
2006-03-24 1:27 ` Patrick McHardy
0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2006-03-24 0:13 UTC (permalink / raw)
To: bunk; +Cc: zhaojignmin, linux-kernel, netdev, netfilter-devel
From: Adrian Bunk <bunk@stusta.de>
Date: Fri, 24 Mar 2006 01:08:01 +0100
> EXPORT_SYMBOL'ed functions shouldn't be static.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Fixed in Linus's tree as of yesterday.
I actually have a patch from Patrick McHardy that will make
this kind of error a build time failure instead of silently
working in the modular case. I just need to test it out
a bit before pushing.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
2006-03-24 0:13 ` David S. Miller
@ 2006-03-24 0:29 ` Adrian Bunk
2006-03-24 1:27 ` Patrick McHardy
1 sibling, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2006-03-24 0:29 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, netfilter-devel, zhaojignmin, linux-kernel
On Thu, Mar 23, 2006 at 04:13:14PM -0800, David S. Miller wrote:
> From: Adrian Bunk <bunk@stusta.de>
> Date: Fri, 24 Mar 2006 01:08:01 +0100
>
> > EXPORT_SYMBOL'ed functions shouldn't be static.
> >
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> Fixed in Linus's tree as of yesterday.
Sorry for missing this, this must have been after Andrew pulled Linus'
tree for creating 2.6.16-mm1 (which is where I was looking at).
> I actually have a patch from Patrick McHardy that will make
> this kind of error a build time failure instead of silently
> working in the modular case. I just need to test it out
> a bit before pushing.
Yes, it would be nice if it would also fail in CONFIG_MODULES=y builds.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
2006-03-24 0:13 ` David S. Miller
2006-03-24 0:29 ` Adrian Bunk
@ 2006-03-24 1:27 ` Patrick McHardy
2006-03-24 6:08 ` David S. Miller
1 sibling, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2006-03-24 1:27 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, netfilter-devel, zhaojignmin, linux-kernel, bunk
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
David S. Miller wrote:
> From: Adrian Bunk <bunk@stusta.de>
> Date: Fri, 24 Mar 2006 01:08:01 +0100
>
>
>>EXPORT_SYMBOL'ed functions shouldn't be static.
>>
>>Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
>
> Fixed in Linus's tree as of yesterday.
>
> I actually have a patch from Patrick McHardy that will make
> this kind of error a build time failure instead of silently
> working in the modular case. I just need to test it out
> a bit before pushing.
I guess I should send it to lkml anyway. It boots fine, I couldn't
figure out how to compare checksums, since the time of compilation
and a couple other dynamically generated strings end up in the binary.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1070 bytes --]
[MODULES]: Don't allow statically declared exports
Add an extern declaration for exported symbols to make the compiler warn
on symbols declared statically.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 8648236083e488ff4fc279b66d63b1187e22e558
tree cba9ee372f1056c8cf63cdc6a37a6a761fa490c9
parent 8b21e6d05d6ac0aeb44f5866ab611e2709c2f08e
author Patrick McHardy <kaber@trash.net> Thu, 23 Mar 2006 05:07:39 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 23 Mar 2006 05:07:39 +0100
include/linux/module.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 70bd843..d956915 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbo
/* For every exported symbol, place a struct in the __ksymtab section */
#define __EXPORT_SYMBOL(sym, sec) \
+ extern typeof(sym) sym; \
__CRC_SYMBOL(sym, sec) \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"))) \
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
2006-03-24 1:27 ` Patrick McHardy
@ 2006-03-24 6:08 ` David S. Miller
0 siblings, 0 replies; 5+ messages in thread
From: David S. Miller @ 2006-03-24 6:08 UTC (permalink / raw)
To: kaber; +Cc: netdev, netfilter-devel, zhaojignmin, linux-kernel, bunk
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 24 Mar 2006 02:27:44 +0100
> I guess I should send it to lkml anyway. It boots fine, I couldn't
> figure out how to compare checksums, since the time of compilation
> and a couple other dynamically generated strings end up in the binary.
This looks fine, I'll push it in during my next round of networking
updates.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-24 6:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-24 0:08 [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static Adrian Bunk
2006-03-24 0:13 ` David S. Miller
2006-03-24 0:29 ` Adrian Bunk
2006-03-24 1:27 ` Patrick McHardy
2006-03-24 6:08 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).