Re: RTNL: assertion failed!?

David S. Miller (davem@redhat.com)
Fri, 3 Sep 1999 13:44:10 -0700


From: Dag Brattli <dagb@cs.uit.no>
Date: 03 Sep 1999 21:54:48 +0100

In the resent development kernels, I have started to see this error when I
register a new IrDA device to the system:

Sep 3 10:33:24 dagbnb kernel: RTNL: assertion failed at devinet.c(784):inetdev_event

Everything is however working just fine, and IrDA devices shouldn't have
much to do with the inet stuff. Could somebody please explain to me what is
going on, and what I need to do to get rid of this assert failure?

You need to make sure that all calls to register_netdev() have the
rtnl semaphore held. Currently if it is called via an adminstrative
call (ie. ifconfig operation code paths in the kernel), the layers
calling you almost certainly have optained the rtnl_lock already.

However if you call register_netdev() outside of that, you need to
explicitly obtain the rtnl_lock()

I fixed several cases of this in drivers/net/net_init.c in 2.3.16 as a
matter of fact.

Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu