Skip to contentSkip to conversation

2.6.22-rc6: local_bh_enable warning

DISCUSSION Russell King 4 participants 4 messages Jun 30, 2007 – Jul 2, 2007

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

Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.

Looks like netfilter is calling local_bh_enable() with IRQs disabled, which would appear to be illegal. Thankfully, this is a warn-once warning.

WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
[<c0021c70>] (dump_stack+0x0/0x14) from [<c00358c0>] (local_bh_enable+0x50/0xac)
[<c0035870>] (local_bh_enable+0x0/0xac) from [<bf0090cc>] (nf_nat_cleanup_conntrack+0x54/0x60 [nf_nat])
 r6:c1a9aa00 r5:c1a9aa00 r4:c15bad3c
[<bf009078>] (nf_nat_cleanup_conntrack+0x0/0x60 [nf_nat]) from [<c0146d50>] (destroy_conntrack+0x6c/0x118)
 r4:c15bac58
[<c0146ce4>] (destroy_conntrack+0x0/0x118) from [<c0144820>] (nf_conntrack_destroy+0x24/0x2c)
 r4:c05d2a80
[<c01447fc>] (nf_conntrack_destroy+0x0/0x2c) from [<c012c05c>] (__kfree_skb+0xd0/0x100)
[<c012bf8c>] (__kfree_skb+0x0/0x100) from [<c012c0d8>] (kfree_skb+0x4c/0x50)
 r5:c12a3800 r4:00000300
[<c012c08c>] (kfree_skb+0x0/0x50) from [<bf03cbb0>] (el3_start_xmit+0xb8/0xd0 [3c589_cs])
[<bf03caf8>] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [<c01324dc>] (dev_hard_start_xmit+0x1a8/0x244)
 r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
[<c0132334>] (dev_hard_start_xmit+0x0/0x244) from [<c013fcc0>] (__qdisc_run+0xb0/0x198)
 r8:00000000 r7:c12a382c r6:c1a9aa00 r5:00000000 r4:c12a3800
[<c013fc10>] (__qdisc_run+0x0/0x198) from [<c01326dc>] (dev_queue_xmit+0x164/0x234)
 r7:c0ed2560 r6:00000000 r5:c1a9aa00 r4:c12a3800
[<c0132578>] (dev_queue_xmit+0x0/0x234) from [<c01572d0>] (ip_output+0x2c0/0x324)
 r6:0000000e r5:c1a9aa00 r4:00000000
[<c0157010>] (ip_output+0x0/0x324) from [<c0158b94>] (ip_push_pending_frames+0x438/0x53c)
 r7:c05d2a80 r6:00000040 r5:c02e8e40 r4:c11fdc10
[<c015875c>] (ip_push_pending_frames+0x0/0x53c) from [<c0158fa0>] (ip_send_reply+0x1c8/0x22c)
[<c0158dd8>] (ip_send_reply+0x0/0x22c) from [<c016dd2c>] (tcp_v4_send_reset+0x148/0x17c)
[<c016dbe4>] (tcp_v4_send_reset+0x0/0x17c) from [<c016ecb4>] (tcp_v4_do_rcv+0x368/0x3a8)
 r7:22a7d38c r6:c0a71060 r5:c1a9a8c0 r4:c0a71060
[<c016e94c>] (tcp_v4_do_rcv+0x0/0x3a8) from [<c016f2b0>] (tcp_v4_rcv+0x5bc/0x8c4)
[<c016ecf4>] (tcp_v4_rcv+0x0/0x8c4) from [<c0152a30>] (ip_local_deliver+0x188/0x218)
[<c01528a8>] (ip_local_deliver+0x0/0x218) from [<c0153374>] (ip_rcv+0x568/0x5c0)
 r6:c1a9a8c0 r5:c1a9a8c0 r4:c11fd420
[<c0152e0c>] (ip_rcv+0x0/0x5c0) from [<c0132ca8>] (netif_receive_skb+0x268/0x29c)
 r7:c12a3800 r6:00000008 r5:c025d96c r4:c1a9a8c0
[<c0132a40>] (netif_receive_skb+0x0/0x29c) from [<c0132d88>] (process_backlog+0xac/0x18c)
 r8:0002f9af r7:c0241ee8 r6:00000000 r5:c025d60c r4:c12a3800
[<c0132cdc>] (process_backlog+0x0/0x18c) from [<c0132ef8>] (net_rx_action+0x90/0x168)
[<c0132e68>] (net_rx_action+0x0/0x168) from [<c0035750>] (__do_softirq+0x5c/0xc8)
 r8:000189c0 r7:c0257960 r6:0000000a r5:c02579b4 r4:00000001
[<c00356f4>] (__do_softirq+0x0/0xc8) from [<c0035980>] (irq_exit+0x40/0x48)
 r7:00000000 r6:c025c280 r5:c0245950 r4:00000006
[<c0035940>] (irq_exit+0x0/0x48) from [<c001d04c>] (asm_do_IRQ+0x4c/0x60)
[<c001d000>] (asm_do_IRQ+0x0/0x60) from [<c001da28>] (__irq_svc+0x28/0x80)
Signature · 1 line
Russell King
#1 lore raw
Quoted 7 lines · Russell King

Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.

Looks like netfilter is calling local_bh_enable() with IRQs disabled, which would appear to be illegal. Thankfully, this is a warn-once warning.

WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
Quoted 8 lines

[...]
[<c01447fc>] (nf_conntrack_destroy+0x0/0x2c) from [<c012c05c>] (__kfree_skb+0xd0/0x100) [<c012bf8c>] (__kfree_skb+0x0/0x100) from [<c012c0d8>] (kfree_skb+0x4c/0x50)
r5:c12a3800 r4:00000300
[<c012c08c>] (kfree_skb+0x0/0x50) from [<bf03cbb0>] (el3_start_xmit+0xb8/0xd0 [3c589_cs]) [<bf03caf8>] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [<c01324dc>] (dev_hard_start_xmit+0x1a8/0x244)
r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
[<c0132334>] (dev_hard_start_xmit+0x0/0x244) from [<c013fcc0>] (__qdisc_run+0xb0/0x198)

Thats a bug in the 3c589_cs driver. Patch attached.

drivers/net/pcmcia/3c589_cs.c +1 -1
index 143ae2f..503f268 100644
@@ -629,9 +629,9 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	outw(SetTxThreshold + 1536, ioaddr + EL3_CMD);
     }
 
-    dev_kfree_skb(skb);
     pop_tx_status(dev);
     spin_unlock_irqrestore(&priv->lock, flags);    
+    dev_kfree_skb(skb);
     
     return 0;
 }
#2 lore raw
Quoted 18 lines · Patrick McHardy
Quoted 7 lines · Russell King

Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.

Looks like netfilter is calling local_bh_enable() with IRQs disabled, which would appear to be illegal. Thankfully, this is a warn-once warning.

WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
Quoted 8 lines

[...]
[<c01447fc>] (nf_conntrack_destroy+0x0/0x2c) from [<c012c05c>] (__kfree_skb+0xd0/0x100) [<c012bf8c>] (__kfree_skb+0x0/0x100) from [<c012c0d8>] (kfree_skb+0x4c/0x50)
r5:c12a3800 r4:00000300
[<c012c08c>] (kfree_skb+0x0/0x50) from [<bf03cbb0>] (el3_start_xmit+0xb8/0xd0 [3c589_cs]) [<bf03caf8>] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [<c01324dc>] (dev_hard_start_xmit+0x1a8/0x244)
r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
[<c0132334>] (dev_hard_start_xmit+0x0/0x244) from [<c013fcc0>] (__qdisc_run+0xb0/0x198)

Quoted 3 lines

Thats a bug in the 3c589_cs driver. Patch attached.

You would post this JUST after I finished my patch applying run, wouldn't you? :)

Will apply in a few minutes, thanks :)

Jeff

#3 lore raw

Re: lib_RTPPROXY module

In reply to Russell King

Jan,
I've updated sources according your review (I hope I understood as you meant it), thanks. I've changed also to xt_RTPPROXY using xtables and tested at last stable kernel 2.6.21.5. Rereview welcome.

Key question again, do you have a svn repository where publish it as external pom?

Tomas

Quoted 10 lines · Tomas Mandys
Quoted 7 lines

so I've finally "finished" work on RTPPROXY module, it seems it works now for kernel 2.6.17.8.
Could änybody review code? What this module should support is described in quoted text bellow and in relatively extensive netfilter-rtpptoxy-howto.txt plus in manpages in tar. I'm not sure if devel list accepts attachments so here is also the link
http://www.2p.cz/tmp/netfilter-rtpproxy.tgz.

(1) CRLF line endings -> LF.

strange, when it happend ???....

Quoted 17 lines

(2) I'd suggest writing xtables now. Make it xt_RTPPROXY.

Quoted 5 lines

#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/netfilter_ipv4/ip_tables.h>

<linux/netfilter/x_tables.h>

Quoted 3 lines

#include <linux/netfilter_ipv4/ip_conntrack.h>
#include <linux/netfilter_ipv4/ipt_RTPPROXY.h>
#include <linux/netfilter_ipv4/ip_nat.h>

These files are probably outdated (use nf_* instead)
.......