netdev
[Top] [All Lists]

Re: catch 22 - porting net driver from 2.2 to 2.4

To: "Hen, Shmulik" <shmulik.hen@xxxxxxxxx>
Subject: Re: catch 22 - porting net driver from 2.2 to 2.4
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Sun, 12 Nov 2000 07:17:57 -0500
Cc: "'LNML'" <linux-net@xxxxxxxxxxxxxxx>, "'LKML'" <linux-kernel@xxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
Organization: MandrakeSoft
References: <07E6E3B8C072D211AC4100A0C9C5758302B2708E@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
"Hen, Shmulik" wrote:
> 
> So how come I get the "RTNL: assertion failed at
> devinet.c(775):inetdev_event" when I call register_netdevice without
> rtnl_lock/unlock ?

Uh.  Don't do that.  You MUST call register_netdevice with rtnl_lock
held.


> and what about rmmod causing the panic when I use unregister_netdev or never
> completing the operation when I use unregister_netdevice ?
> does module_exit run inside rtnl_lock too ?

module_exit does not run inside rtnl_lock.

Theoretically, if you call unregister_netdev from rmmon, it should grab
rtnl_lock and then complete the operation for you.  If that doesn't work
for you, it sounds like you are not setting up, or cleaning up,
something correctly.

Basically... it sounds like there are still bugs in your driver that
need working out :)

        Jeff


-- 
Jeff Garzik             |
Building 1024           | Would you like a Twinkie?
MandrakeSoft            |

<Prev in Thread] Current Thread [Next in Thread>