Skip to contentSkip to conversation

"local_bh_disable" [net/ipv4/netfilter/ip_conntrack_pptp.ko] undefined!

DISCUSSION Marco Berizzi 2 participants 4 messages Jan 11, 2006 – Jan 16, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I'm compiling pptp conntrack/nat as module and I getting this warning:

make modules output:

CC [M] net/ipv4/netfilter/ip_conntrack_helper_pptp.o
CC [M] net/ipv4/netfilter/ip_conntrack_proto_gre.o
net/ipv4/netfilter/ip_conntrack_proto_gre.c: In function `gre_keymap_lookup':
net/ipv4/netfilter/ip_conntrack_proto_gre.c:84: warning: implicit declaration of function local_bh_disable' net/ipv4/netfilter/ip_conntrack_proto_gre.c:89: warning: implicit declaration of function local_bh_enable'

 CC [M]  net/ipv4/netfilter/ip_nat_helper_pptp.o
 CC [M]  net/ipv4/netfilter/ip_nat_proto_gre.o
 LD [M]  net/ipv4/netfilter/ip_conntrack_pptp.o
 CC [M]  net/ipv4/netfilter/ip_conntrack_tftp.o
 CC [M]  net/ipv4/netfilter/ip_conntrack_ftp.o
 LD [M]  net/ipv4/netfilter/ip_nat_pptp.o
 CC [M]  net/ipv4/netfilter/ip_nat_tftp.o
 CC [M]  net/ipv4/netfilter/ip_nat_ftp.o

[...]
CC [M] lib/libcrc32c.o
Building modules, stage 2.
MODPOST
*** Warning: "local_bh_disable" [net/ipv4/netfilter/ip_conntrack_pptp.ko] undefined!
CC drivers/block/floppy.mod.o

Linux is 2.6.15-git7 compiled on Slackware 10.2 (gcc 3.3.6 glibc 2.3.5)

#1 lore raw

From: "Marco Berizzi" <[email protected]>
Date: Wed, 11 Jan 2006 10:49:12 +0100

Quoted 1 line

I'm compiling pptp conntrack/nat as module and I getting this warning:

This should fix it:

include/linux/spinlock.h +1 -0
index 799be67..7db4df8 100644
@@ -53,6 +53,7 @@
 #include <linux/thread_info.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
+#include <linux/interrupt.h>
 
 #include <asm/system.h>
 
#2 lore raw
Quoted 12 lines · David S. Miller

From: "Marco Berizzi" <[email protected]>
Date: Wed, 11 Jan 2006 10:49:12 +0100

Quoted 1 line

I'm compiling pptp conntrack/nat as module and I getting this warning:

This should fix it:

include/linux/spinlock.h +0 -0
index 799be67..7db4df8 100644

include/linux/spinlock.h line 58

Quoted 6 lines
include/linux/spinlock.h +1 -0
@@ -53,6 +53,7 @@
 #include <linux/thread_info.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
+#include <linux/interrupt.h>
 
 #include <asm/system.h>

Sorry David for wasting your time, but I applied your patch to 2.6.15-git8 and...

root@Calimero:/usr/src/linux# make bzImage
 Building kernel 2.6.15-git8
 CHK     include/linux/version.h
 UPD     include/linux/version.h
 SYMLINK include/asm -> include/asm-i386
 SPLIT   include/linux/autoconf.h -> include/config/*
 CC      arch/i386/kernel/asm-offsets.s
In file included from include/linux/hardirq.h:6,
                from include/linux/interrupt.h:11,
                from include/linux/spinlock.h:56,
                from include/linux/capability.h:45,
                from include/linux/sched.h:7,
                from arch/i386/kernel/asm-offsets.c:7:
include/linux/smp_lock.h:11: error: syntax error before "__reacquire_kernel_lock"
include/linux/smp_lock.h:11: warning: type defaults to `int' in declaration of `__reacquire_kernel_lock'
include/linux/smp_lock.h:11: warning: data definition has no type or storage class
include/linux/smp_lock.h:12: error: syntax error before "__release_kernel_lock"
include/linux/smp_lock.h:12: warning: type defaults to `int' in declaration of `__release_kernel_lock'
include/linux/smp_lock.h:12: warning: data definition has no type or storage class
include/linux/smp_lock.h: In function `reacquire_kernel_lock':
include/linux/smp_lock.h:36: error: dereferencing pointer to incomplete type
include/linux/smp_lock.h: At top level:
include/linux/smp_lock.h:41: error: syntax error before "lock_kernel"
include/linux/smp_lock.h:41: warning: type defaults to `int' in declaration of `lock_kernel'
include/linux/smp_lock.h:41: warning: data definition has no type or storage class
include/linux/smp_lock.h:42: error: syntax error before "unlock_kernel"
include/linux/smp_lock.h:42: warning: type defaults to `int' in declaration of `unlock_kernel'
include/linux/smp_lock.h:42: warning: data definition has no type or storage class
In file included from include/asm/hardirq.h:6,
                from include/linux/hardirq.h:7,
                from include/linux/interrupt.h:11,
                from include/linux/spinlock.h:56,
                from include/linux/capability.h:45,
                from include/linux/sched.h:7,
                from arch/i386/kernel/asm-offsets.c:7:
include/linux/irq.h:79: error: syntax error before "spinlock_t"
include/linux/irq.h:79: warning: no semicolon at end of struct or union
include/linux/irq.h:83: warning: type defaults to `int' in declaration of `irq_desc_t'
include/linux/irq.h:85: error: syntax error before "irq_desc"
include/linux/irq.h:85: warning: type defaults to `int' in declaration of `irq_desc'
include/linux/irq.h:85: warning: data definition has no type or storage class
include/linux/irq.h:88: error: syntax error before '*' token
include/linux/irq.h:90: warning: return type defaults to `int'
In file included from include/asm/hardirq.h:6,
                from include/linux/hardirq.h:7,
                from include/linux/interrupt.h:11,
                from include/linux/spinlock.h:56,
                from include/linux/capability.h:45,
                from include/linux/sched.h:7,
                from arch/i386/kernel/asm-offsets.c:7:
include/linux/irq.h:219: error: syntax error before "irq_desc_t"
include/linux/irq.h:220: warning: function declaration isn't a prototype
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
#3 lore raw

Re: "local_bh_disable" [net/ipv4/netfilter/ip_conntrack_pptp.ko]undefined!

Me again.
This patch resolves this problem (tested on 2.6.15-git12):

*** linux-2.6.15/net/ipv4/netfilter/ip_conntrack_proto_gre.c 2006-01-16 12:50:26.000000000 +0100
--- linux-2.6.15-git12/net/ipv4/netfilter/ip_conntrack_proto_gre.c 2006-01-16 12:20:25.000000000 +0100
***************
*** 32,37 ****
--- 32,38 ----
#include <linux/in.h>
#include <linux/list.h>
#include <linux/seq_file.h>
+ #include <linux/interrupt.h>

static DEFINE_RWLOCK(ip_ct_gre_lock);
#define ASSERT_READ_LOCK(x)

Quoted 20 lines · Marco Berizzi
Quoted 18 lines · David S. Miller

From: "Marco Berizzi" <[email protected]>
Date: Wed, 11 Jan 2006 10:49:12 +0100

Quoted 1 line

I'm compiling pptp conntrack/nat as module and I getting this warning:

This should fix it:

include/linux/spinlock.h +1 -0
index 799be67..7db4df8 100644
@@ -53,6 +53,7 @@
 #include <linux/thread_info.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
+#include <linux/interrupt.h>
 
 #include <asm/system.h>