[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a44d5568-48d6-44f7-af93-e1b966489a84@I-love.SAKURA.ne.jp>
Date: Wed, 16 Jul 2025 19:09:51 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Sean Young <sean@...s.org>, Alan Stern <stern@...land.harvard.edu>
Cc: Hillf Danton <hdanton@...a.com>,
syzbot+592e2ab8775dbe0bf09a@...kaller.appspotmail.com,
LKML <linux-kernel@...r.kernel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: [PATCH] media: imon: make send_packet() more robust
On 2025/07/16 18:38, Sean Young wrote:
> On Tue, Jul 15, 2025 at 09:30:02PM -0400, Alan Stern wrote:
>> On Tue, Jul 15, 2025 at 09:19:18PM +0100, Sean Young wrote:
>>> Hi Alan,
>>>
>>> On Sun, Jul 13, 2025 at 11:21:24AM -0400, Alan Stern wrote:
>>>> On Sun, Jul 13, 2025 at 04:11:47PM +0800, Hillf Danton wrote:
>>>>> [loop Alan in]
>>>>
>>>> I assume you're interested in the question of when to avoid resubmitting
>>>> URBs.
I think that what Hillf wanted to know (and I wanted maintainers of this
driver to respond) is whether timeout of 10 seconds is reasonable
- /* Wait for transmission to complete (or abort) */
- retval = wait_for_completion_interruptible(
- &ictx->tx.finished);
- if (retval) {
+ /* Wait for transmission to complete (or abort or timeout) */
+ retval = wait_for_completion_interruptible_timeout(&ictx->tx.finished, 10 * HZ);
because the reproducer for this problem sometimes prevents
usb_rx_callback_intf0() from being called. Unless we somehow
handle such situation, the hung task reports won't go away.
>>> I think that is why this driver code is so awkward.
>>
>> That's what usb_driver_claim_interface() is for. IIRC, the cdc-acm
>> driver uses it in exactly this way.
>
> Very interesting, we should look at re-writing this driver. Note this
> function is not documented in Documentation/driver-api/usb/
OK. Then, what do you want to do for this syzbot report?
If you want to apply this patch, I'll send an updated patch with Alan's comment.
If you want to directly rewrite this module, this patch will be discarded.
Powered by blists - more mailing lists