Network Stack Deadlock
— at Version 2
Yesterday I was doing some tests with the network stack, and after a while, I experienced a deadlock. ifconfig was locked and couldn't be killed (even with kill -9). net_server was locked, too.
I then entered KDL, and had a look at the threads involved.
There was a deadlock between ifconfig and wpa_supplicant. The net_interfaces mutex was held by wpa_supplicant, which was waiting on the mutex of the wireless interface, which in turn was held by ifconfig.
So I guess we have a lock inversion somewhere.
It's reproducible here 100% of the times by doing:
ifconfig /dev/net/<wireless_card> down
while wpa_supplicant is scanning the available networks.
I have an ipro3945 wireless card.