All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.0-test9 : bridge freezes
@ 2003-11-22 15:27 SVR Anand
  2003-11-22 16:19 ` Gene Heskett
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: SVR Anand @ 2003-11-22 15:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-net

Hi,

I am one of the system administrators who manage a campus network of 5000 users
that is connected to Internet. We have placed a Linux bridge to isolate the 
Internet from the campus. To nullify network flooding effect, we have used 
iptables. The kernel is 2.6.0-test9, the ethernet cards that are used are 
RTL8139.

The problem is : After 3 to 4 hours of functioning, the bridge stops working 
and the machine becomes unusable where it doesn't respond to keyboard, and 
there is no video display. In simple terms it freezes. Before going in for 
2.6.0-test9 I have tried 2.4.20 with bridge patches for iptables support. It
worked reliably except that I cannot even login from the console because 
I don't get the shell prompt after a while. 

Presently I have gone back to 2.4.20 for the sake of robustness. Can someone
let me know what I can do to use 2.6.x kernel with a good amount of confidence
so that I can keep the campus users happy ? I am making guess work as
to whether the problem is with the network drivers, or some power management 
issues, and so on.

Any inputs from you will be really useful. I am eager to try out any amount
of debugging, the thing is I don't know what to look for.


Anand

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: 2.6.0-test9 : bridge freezes
@ 2003-12-15 13:15 Steve Hill
  2003-12-16  1:17 ` David S. Miller
  0 siblings, 1 reply; 22+ messages in thread
From: Steve Hill @ 2003-12-15 13:15 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1200 bytes --]


With both conntrack and bridging turned on in the 2.6.0test11 kernel, 
sending fragmented packets over the bridge reveals a memory leak 
(specifically, forwarding packets from any interface to a bridge).  The 
memory that is leaking seems to be being allocated on line 299 on 
net/bridge/br_netfilter.c:

        if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
                return NF_DROP;

Only the first fragment gets freed later on.

The patch attached fixes the problem by freeing nf_bridge when the 
packets are defragmented, however I am sure this is not the right place 
to do this.  Where would the skb's for the fragments usually get freed?

Bart De Schuymer suggested that they should be freed in 
skbuff.c::skb_release_data(), but having looked at this it seems to do 
this already.  skb_release_data() calls skb_drop_fraglist(), which does 
kfree_skb() on each fragment, and kfree_skb calls nf_bridge_put correctly 
so this isn't the problem.

-- 

- Steve Hill
Senior Software Developer                        Email: steve@navaho.co.uk
Navaho Technologies Ltd.                           Tel: +44-870-7034015

        ... Alcohol and calculus don't mix - Don't drink and derive! ...


[-- Attachment #2: Type: TEXT/PLAIN, Size: 565 bytes --]

diff -urN linux-2.6.0-test11.vanilla/net/ipv4/ip_fragment.c linux-2.6.0-test11/net/ipv4/ip_fragment.c
--- linux-2.6.0-test11.vanilla/net/ipv4/ip_fragment.c	2003-12-12 19:27:07.000000000 +0000
+++ linux-2.6.0-test11/net/ipv4/ip_fragment.c	2003-12-15 08:49:01.000000000 +0000
@@ -592,6 +592,9 @@
 	atomic_sub(head->truesize, &ip_frag_mem);
 
 	for (fp=head->next; fp; fp = fp->next) {
+#ifdef CONFIG_BRIDGE_NETFILTER
+		nf_bridge_put(fp->nf_bridge);
+#endif
 		head->data_len += fp->len;
 		head->len += fp->len;
 		if (head->ip_summed != fp->ip_summed)

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

end of thread, other threads:[~2003-12-17 18:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-22 15:27 2.6.0-test9 : bridge freezes SVR Anand
2003-11-22 16:19 ` Gene Heskett
2003-11-22 16:20 ` Linus Torvalds
2003-11-23 23:26   ` David S. Miller
2003-11-24  0:02     ` Markus Hästbacka
2003-11-25 17:21     ` 2.6.0-test9-bk25 : bridge works fine SVR Anand
2003-11-29  9:44     ` Bridging woes after 3 days SVR Anand
2003-12-01 19:33       ` Stephen Hemminger
2003-11-22 19:18 ` 2.6.0-test9 : bridge freezes Markus Hästbacka
2003-11-24 19:09 ` [Bridge] " Stephen Hemminger
2003-11-24 19:09   ` Stephen Hemminger
2003-11-25  6:39   ` [Bridge] " SVR Anand
2003-11-25  6:39     ` SVR Anand
  -- strict thread matches above, loose matches on Subject: below --
2003-12-15 13:15 Steve Hill
2003-12-16  1:17 ` David S. Miller
2003-12-16  7:43   ` Bart De Schuymer
2003-12-16  7:46     ` David S. Miller
2003-12-16  9:00     ` Steve Hill
2003-12-16 21:46       ` Bart De Schuymer
2003-12-16 21:49         ` David S. Miller
2003-12-17  8:36         ` Steve Hill
2003-12-17 18:27           ` Bart De Schuymer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.