kuznet@xxxxxxxxxxxxx wrote:
>
> Hello!
>
> > unregister_netdevice: Old style device vlan0004 leaked(refcnt=1). Wait
> > for crash.
> > (I especially like the last part!!)
>
> It does not lie. If that guy who holds refcnt will remember about this
> device finally, it will be oops in the best case or even memory corruption.
I think I found most of them. The problem was that I found devices
by their name quite often: dev_get_by_name(), and never explicitly
released them.
Does this also cause problems in the 2.2 kernels?
>
> If you allocate device struct via kmalloc(), it is better to convert
> it to "new style". F.e. look into tunnels or to ppp.
I'll do that...
> > Is this problem something that my code could be responsible for,
> > or is it something else in the stack?
>
> It can be everywhere, where the device is referenced. Debug!
I think we should put some comments in the net_device struct to
explain what kinds of calls increment/decrement the refcnt. I
eventually figured out it was the dev_put/dev_get* methods, but
only lots of poking and grepping yielded that...
Ben
--
Ben Greear (greearb@xxxxxxxxxxxxxxx) http://scry.wanfear.com/~greear
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
http://scry.wanfear.com
|