[PATCH] The ioctl wext etc, seems to be broken because they don't take any lock during shutdown. If the user do an echo to the state variabile of the rfkill during the network scanning the system can go in panic. It introduces a reference count to the ar priv data and a hw_available variable and a new spin lock. If a process has a ioctl pending, the shutdown process set the hardware unvailable and wait for pending request.