Re: [PATCH next] usb: usbfs: Add reset_resume for usbfs

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

 



On 15.07.24 16:22, Alan Stern wrote:
On Mon, Jul 15, 2024 at 10:53:14AM +0200, Oliver Neukum wrote:


On 11.07.24 16:41, Alan Stern wrote:

Agreed, but the solution is pretty simple.  Because the device was
suspended, the userspace driver must have enabled suspend via the
USBDEVFS_ALLOW_SUSPEND ioctl.

The whole system could have been suspended, in particularly to S4.

You are right.  I was thinking of runtime suspend, not system suspend.
My mistake.

This is at the intersection of several scenarios. That is a good part of
what makes this difficult.
In principal I think we could get away with checking for a flag to be set
at reset_resume() before each operation. Elegant this is not. Yet, it seems
to me like the race necessarily exists and is unsolvable in user space.

Furthermore in the long run, if we want to use D3cold in runtime power
management, it looks to me like we would want a second permission ioctl
for that.

	Regards
		Oliver





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

  Powered by Linux