On 06/02/17(Mon) 12:39, Theo Buehler wrote: > On Mon, Feb 06, 2017 at 12:27:15PM +0100, Martin Pieuchot wrote: > > Paul and Antoine reported that, since the NET_LOCK() went in, doing a > > channel scan with iwm(4) and iwn(4) freezes X. > > > > This is a deadlock due to the fact that wireless drivers sleep during > > a long time holding the NET_LOCK() while the X server tries to > > communicate with unix sockets, that still need the NET_LOCK(). > > > > The obvious solution to this problem is to not hold the NET_LOCK() for > > unix socket related operations. We're working on that. > > > > However since hardware ioctl(2) can sleep there's no problem to release > > the NET_LOCK() there. This is true for all ioctls that are not > > modifying any stack state (address, multicast group, etc). Hence the > > diff below that should fix the problem in a generic way. > > > > ok? > > This fixes the issue on my iwn0, but re-introduces the problem on my iwm0.
That means another ioctl(2) triggers the problem with iwm(4). It would help if you could figure out which one. > Tested with > > iwn0 at pci2 dev 0 function 0 "Intel Centrino Ultimate-N 6300" rev 0x35: msi, > MIMO 3T3R, MoW > > and > > iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7265" rev 0x59, msi > iwm0: hw rev 0x210, fw ver 16.242414.0 >