Re: [PATCH] usbip: Stop tracking work context in event_handler()

From: Michael Grzeschik

Date: Wed Nov 11 2026 - 17:14:47 EST


Hi John,

On Mon, Aug 03, 2026 at 10:43:58AM +0000, John Ernberg wrote:
> From: Wiliam Puranen <wiliam.puranen@xxxxxxxx>
>
> The work queue used by usbip is not pinned to a specific context.
>
> When usbip_in_eh() evaluates if the call comes from the event handler
> it doesn't actually check if the call comes from the event handler but
> if the call comes from the same context as the event handler was first
> called from.
>
> This can result in "sticky" devices on the client side, due to the
> teardown path in stub_disconnect() being lied to, and thus skipping
> the teardown when it shouldn't, or vice versa.
>
> Fixes: bb7871ad99ea ("usbip: event handler as one thread")
> Cc: stable@xxxxxxxxxxxxxxx # v4.6+
> Assisted-by: claude:opus-5
> Signed-off-by: Wiliam Puranen <wiliam.puranen@xxxxxxxx>
> Signed-off-by: John Ernberg <john.ernberg@xxxxxxxx>

Just as I stated in my other mail [1]. I just did send a near copy of
the change without knowing of this mail. But this one is the patch to
be taken.

Fixes: bb7871ad99ea ("usbip: event handler as one thread")
Reviewed-by: Michael Grzeschik <grzeschik@xxxxxxxxx>

[1]: https://lore.kernel.org/linux-usb/427d908d-1fa2-442c-ac91-b3e925e5c7bb@xxxxxxxx/T/#m2d50ad8abda5dc92fe6d8690edc0cab58983ab74

Thanks
Michael