netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* unregister_netdev() deadlock
@ 2008-02-27 15:44 Jeba Anandhan
  2008-02-27 16:46 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Jeba Anandhan @ 2008-02-27 15:44 UTC (permalink / raw)
  To: netdev; +Cc: matthew.hattersley

Hi all,
I have doubts about unregister the netdevice.

Scenario
I have two netdevice entities. I wish to unregister one entity.

struct net_device *dev1;
struct net_device *dev2;

dev1->timer = XXX;
dev2->timer = YYY;

dev1->ioctl() {

...
case delete_other:
            unregister_netdev(dev2);
            free_netdev(dev2);
            return 0;
...
}

The dev2->refcnt is not zero in this case. unregister_netdev(dev2) cause
deadlock. Could you tell me why it happens?.


It works smoothly when we call the unregister_netdev(dev2) from
cleanup_module(). dev2->refcnt is not zero in this case.  Still it is
able to unregister.


Thanks
Jeba



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-27 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-27 15:44 unregister_netdev() deadlock Jeba Anandhan
2008-02-27 16:46 ` Stephen Hemminger
2008-02-27 17:05   ` Jeba Anandhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).