> Please explain to me why do we have to hold rtnl lock while sleeping in
> unregister_netdevice ?
... not "while sleeping", but just "while".
If the lock would be for the device, it would be local to the device,
rather than global. The semaphore blocks all the networking configuration
until caller will complete stuff related to unregistering.
Forward references from the unregistered device under cannot be invalidated
before the device is unregistered. All such work is done after unregistry
for "old style" or in dev->uninit/destructor hooks, which are used
by "new style" devices.
> 1 - Something is not releasing device
Let's find this something! It witnesses about really serious bug.
I cannot reproduce this too. Understand, please, we _can_ follow
your proposal, all 100% of old style devices do not need uninit in real
life. But then we never will find the bug. You cannot reproduce it,
I cannot too.
> 2 - We're sleeping with the rntl_lock held
Semaphores are used exaclty when we have to sleep while holding lock.
> fix it. If one thing is buggy it doesn't mean
It means exactly this. Kernel panic would be even better, if it was
possible to detect deadlock reliably.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:33 EST