Re: [PATCH] usb: usbfs: Add reset_resume callback to usbfs.

From: Oliver Neukum
Date: Mon Aug 25 2025 - 05:53:11 EST


On 8/25/25 04:19, 自己 wrote:

According to the current experimental findings, when userspace encounters
an error while using the previous file descriptor (fd), it does not proceed to unbind
and rebind automatically. Therefore, the two uevents were added in the kernel to explicitly
notify userspace to unbind and rebind.

Sure, but that means that user space has a bug.
That race is present in every case. Even if the kernel
were to notify user space by additional channels,
user space could already be in the process of calling
into the kernel.
There is no way of avoiding the need for user space
to handle this error return correctly.

Regards
Oliver