From: Michael Grzeschik <grzeschik@puzzle.ch>
To: John Ernberg <john.ernberg@actia.se>,
Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>, Hongren Zheng <i@zenithal.me>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usbip: identify the event handler with current_work()
Date: Wed, 11 Nov 2026 22:58:46 +0100 [thread overview]
Message-ID: <fcb2a8a4-f116-4bf4-b90b-b07af8a3da7c@puzzle.ch> (raw)
In-Reply-To: <427d908d-1fa2-442c-ac91-b3e925e5c7bb@actia.se>
[-- Attachment #1.1: Type: text/plain, Size: 1214 bytes --]
Hi John
On 2026-11-11 4:35 PM, John Ernberg wrote:
> Hi Michael,
>
> On 11/11/2026 12:34, Michael Grzeschik wrote:
>> usbip_in_eh() compares the task with worker_context, the first worker
>> that ever ran the event handler. Workers of the unbound usbip_event
>> workqueue are reaped when idle and new ones run the handler later, so the
>> check fails inside the event handler, and the remembered task_struct may
>> be reused by any other task, which then wrongly counts as the event
>> handler. stub_disconnect() relies on it to skip the shutdown of a device
>> reset from the event handler.
>>
>> Ask the workqueue which work item the current task executes instead.
>>
>> Signed-off-by: Michael Grzeschik <grzeschik@puzzle.ch>
>
> We sent a similar patch back in August that we forgot to follow up on. [1]
>
> Reviewed-by: John Ernberg <john.ernberg@actia.se>
>
> [1]: https://lore.kernel.org/linux-usb/20260803104342.2790105-1-john.ernberg@actia.se/
Damn, I really should have checked the usb list better before sending my change.
Please lets use your change then. I will just send my Reviewed-by and push for your contribution.
So please ignore this mail.
Thanks,
Michael
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
prev parent reply other threads:[~2026-11-11 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 11:34 [PATCH 0/2] usbip: stability changes Michael Grzeschik
2026-11-11 11:34 ` [PATCH 1/2] usbip: stub: reference count struct stub_device Michael Grzeschik
2026-11-11 11:34 ` [PATCH 2/2] usbip: identify the event handler with current_work() Michael Grzeschik
2026-11-11 15:35 ` John Ernberg
2026-11-11 21:58 ` Michael Grzeschik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcb2a8a4-f116-4bf4-b90b-b07af8a3da7c@puzzle.ch \
--to=grzeschik@puzzle.ch \
--cc=gregkh@linuxfoundation.org \
--cc=i@zenithal.me \
--cc=john.ernberg@actia.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®