On Thu, 6 Nov 2003 11:58:24 -0800
Krishna Kumar <kumarkr@xxxxxxxxxx> wrote:
> When unregister_netdev() is called by the driver, it first calls
> unregister_netdevice() which
> drops it's last ref to the dev, making it zero. unregister_netdev() then
> calls rtnl_unlock() which
> calls netdev_run_todo(), which calls netdev_wait_allrefs() and only after
> that succeeds,
> does the driver do a free_netdev(). So the dev should not be freed while
> the wait_ref() is
> executing, and the original code looks correct.
> I don't know if it is some corruption on my system, some hardware problem ?
> I will look
> some more, also try to get a different machine.
It could be some 'user after free' or similar issue.
Just an idea of something else to look for.
My earlier comments about "putting to zero multiple times" were
misguided, I forgot that these days dev_put() just decrements the
count and does not do anything special when the count reaches zero.