I've fought this problem in USB drivers. Ideally you'd also have the detach path /also/ take said lock and drain anyone currently doing anything active (tx, rx, ioctls, net80211 methods, etc) to completion before continuing. A lot of drivers don't do this very well, or at all. -adrian