Skip to contentSkip to conversation

RTNL assert

DISCUSSION Stephen E. Clark 5 participants 7 messages Oct 28, 2000 – Oct 30, 2000

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

When I configure in Tunneling I get the following error message. Is this normal? This with 2.4test9pre5

GRE over IPv4 tunneling driver
RTNL: assertion failed at devinet.c(775):inetdev_event
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 6 lines · Stephen E. Clark

When I configure in Tunneling I get the following error message. Is this normal? This with 2.4test9pre5

GRE over IPv4 tunneling driver
RTNL: assertion failed at devinet.c(775):inetdev_event

The rtnetlink lock needs to be taken around register_netdevice(). There should be a function which does these three common steps, but there isn't.

net/ipv4/ip_gre.c +2 -0
@@ -1266,7 +1266,9 @@
 #ifdef MODULE
 	register_netdev(&ipgre_fb_tunnel_dev);
 #else
+	rtnl_lock();
 	register_netdevice(&ipgre_fb_tunnel_dev);
+	rtnl_unlock();
 #endif
 
 	inet_add_protocol(&ipgre_protocol);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to Stephen E. Clark
Quoted 26 lines · Andrew Morton
Quoted 6 lines · Stephen E. Clark

When I configure in Tunneling I get the following error message. Is this normal? This with 2.4test9pre5

GRE over IPv4 tunneling driver
RTNL: assertion failed at devinet.c(775):inetdev_event

The rtnetlink lock needs to be taken around register_netdevice(). There should be a function which does these three common steps, but there isn't.

net/ipv4/ip_gre.c Sat Oct 28 21:44:23 2000 renamed from net/ipv4/ip_gre.c Sat Sep 9 16:19:30 2000 +2 -1
@@ -1266,7 +1266,9 @@
 #ifdef MODULE
        register_netdev(&ipgre_fb_tunnel_dev);
 #else
+       rtnl_lock();
        register_netdevice(&ipgre_fb_tunnel_dev);
+       rtnl_unlock();
 #endif
 
        inet_add_protocol(&ipgre_protocol);
-
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

Thanks Andrew,

I also get the same error if I try to configure in normal IPV4 tunneling. I guess it needs the same kind of patch.

Oct 27 14:46:59 joker kernel: IPv4 over IPv4 tunneling driver 
Oct 27 14:46:59 joker kernel: RTNL: assertion failed at
devinet.c(775):inetdev_event 
Oct 27 14:46:59 joker kernel: GRE over IPv4 tunneling driver 
Oct 27 14:46:59 joker kernel: RTNL: assertion failed at

devinet.c(775):inetdev_event

Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw
In reply to Stephen E. Clark
Quoted 3 lines · Stephen E. Clark

I also get the same error if I try to configure in normal IPV4 tunneling. I guess it needs the same kind of patch.

Yep.

net/ipv4/ipip.c +2 -0
@@ -894,7 +894,9 @@
 #ifdef MODULE
 	register_netdev(&ipip_fb_tunnel_dev);
 #else
+	rtnl_lock();
 	register_netdevice(&ipip_fb_tunnel_dev);
+	rtnl_unlock();
 #endif
 
 	inet_add_protocol(&ipip_protocol);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw

There is even one more Andrew :-) Here is the full patch:

net/ipv4/ip_gre.c renamed from net/ipv4/ip_gre.c.~1~ +2 -0
@@ -1266,7 +1266,9 @@
 #ifdef MODULE
 	register_netdev(&ipgre_fb_tunnel_dev);
 #else
+	rtnl_lock();
 	register_netdevice(&ipgre_fb_tunnel_dev);
+	rtnl_unlock();
 #endif
 
 	inet_add_protocol(&ipgre_protocol);
net/ipv4/ipip.c renamed from net/ipv4/ipip.c.~1~ +2 -0
@@ -894,7 +894,9 @@
 #ifdef MODULE
 	register_netdev(&ipip_fb_tunnel_dev);
 #else
+	rtnl_lock();
 	register_netdevice(&ipip_fb_tunnel_dev);
+	rtnl_unlock();
 #endif
 
 	inet_add_protocol(&ipip_protocol);
net/ipv6/sit.c renamed from net/ipv6/sit.c.~1~ +2 -0
@@ -829,7 +829,9 @@
 #ifdef MODULE
 	register_netdev(&ipip6_fb_tunnel_dev);
 #else
+	rtnl_lock();
 	register_netdevice(&ipip6_fb_tunnel_dev);
+	rtnl_unlock();
 #endif
 	inet_add_protocol(&sit_protocol);
 	return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Andrew Morton
Quoted 3 lines · Andrew Morton

The rtnetlink lock needs to be taken around register_netdevice(). There should be a function which does these three common steps, but there isn't.

I thought the only difference between register_netdev() and register_netdevice() was that one took the rtnl_lock and the other didn't?

But it's been a while since I played with networking code.

Signature · 7 lines
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#3 lore raw
Quoted 9 lines · David Woodhouse
Quoted 3 lines · Andrew Morton

The rtnetlink lock needs to be taken around register_netdevice(). There should be a function which does these three common steps, but there isn't.

I thought the only difference between register_netdev() and register_netdevice() was that one took the rtnl_lock and the other didn't?

And, register_netdev allocates a name for you if necessary...

Signature · 8 lines
Jeff Garzik             | "Mind if I drive?"  -Sam
Building 1024           | "Not if you don't mind me clawing at the
MandrakeSoft            |  dash and shrieking like a cheerleader."
                        |                     -Max
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/