Re: [PATCH] usb: sysfs: make locking interruptible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2016-01-14 at 12:20 +0000, Dean Jenkins wrote:

> Unwanted blocking occurs when read_descriptors() is getting the 
> descriptor information from the allocated rawdescriptors structure of a 
> USB hub but a device connected to the hub is failing and the device is 
> being recovered.

Quite possibly so. It is a separate issue. I'd be happy to provide
a patch.
But it is not the only read that might block. The rest is also
annoying. An uninterruptible sleep on an event that can take
so long is no good.

> This patch helps in the case where the userland application is being 
> terminated by Ctrl-C whilst a failing USB device is being recovered due 
> to communication failure which causes blocking to get the USB hub 
> descriptors information from memory.

Yes, that is the patch's point.

> Have you checked that the calling sysfs layer can handle the returned 
> error code of -EINTR ? What code handles that ?

-EINTR is supposed to go to user space.

> Note that read_descriptors() gets called multiple times (I have seen 3 
> calls) per a single sysfs read.

OK, but what does that change?

	Regards
		Oliver


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux