#9377: Network Stack Deadlock ----------------------------------------+---------------------------- Reporter: jackburton | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: Network & Internet/Stack | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------------+---------------------------- Comment (by axeld): That does not work, unfortunately. First of all, a second get_interface() for the same name might return an invalid interface (ie. one that hasn't been completely initialized), or CreateDomainDatalinkIfNeeded() might be called twice. Second of all, if you do not acquire a reference before losing the lock, the interface might be deleted by someone else before you do. In general, I think the locking order "all interfaces" -> "single interface" is more natural than the other way around. Maybe `SetDown()` can be changed to not hold the interface lock when calling into the interface code. If that isn't possible at all (I don't remember), another way would be to lock the interfaces lock, too (in the right order). -- Ticket URL: <http://dev.haiku-os.org/ticket/9377#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.