From: John Ernberg <john.ernberg@actia.se>
To: Michael Grzeschik <grzeschik@puzzle.ch>,
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 16:35:31 +0100 [thread overview]
Message-ID: <427d908d-1fa2-442c-ac91-b3e925e5c7bb@actia.se> (raw)
In-Reply-To: <20261111-usbip-v1-2-da5217ac71d7@puzzle.ch>
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/
Thanks! // John Ernberg
prev parent reply other threads:[~2026-11-11 15:35 UTC|newest]
Thread overview: 4+ 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 [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=427d908d-1fa2-442c-ac91-b3e925e5c7bb@actia.se \
--to=john.ernberg@actia.se \
--cc=gregkh@linuxfoundation.org \
--cc=grzeschik@puzzle.ch \
--cc=i@zenithal.me \
--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®