#9377: Network Stack Deadlock ----------------------------------------+---------------------------- Reporter: jackburton | Owner: axeld Type: bug | Status: closed Priority: normal | Milestone: R1 Component: Network & Internet/Stack | Version: R1/Development Resolution: fixed | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ----------------------------------------+---------------------------- Comment (by axeld): Almost: * You still need to hold the all interfaces lock when setting the interface busy, otherwise you might hand out busy interfaces; the lock can be released as soon as the interface is made busy. * Not sure if SetDown() can be reached in that phase, but if it does, it would need to check for being busy as well (and bail out in that case). Also, I don't know if it's currently given that SetDown() can only be called when there are no other interface users. If it isn't the patch is going to be more involved. * Indenting seems off in interfaces.h ("inline" must be indented one tab if it isn't) -- if the rest doesn't fit, it's probably not correctly indented either, though (I think the current indentation rule is newer than the network stack). Have you tried if it works? :-) I'll try to read through that code again in the next couple of days to make sure that SetDown() works the way it should in this context. It could very well be that setting the interface busy might only be needed in the _SetUp() case. -- Ticket URL: <https://dev.haiku-os.org/ticket/9377#comment:16> Haiku <https://dev.haiku-os.org> Haiku - the operating system.