From: Alan Stern <stern@rowland.harvard.edu>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Yunseong Kim <ysk@kzalloc.com>,
linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
Andrey Konovalov <andreyknvl@google.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller@googlegroups.com
Subject: Re: [BUG] usbip: vhci: Sleeping function called from invalid context in vhci_urb_enqueue on PREEMPT_RT
Date: Wed, 20 Aug 2025 16:53:22 -0400 [thread overview]
Message-ID: <f632babc-6f66-4ccc-93f8-1558fbcdeb08@rowland.harvard.edu> (raw)
In-Reply-To: <20250820162621.UiUQUcp1@linutronix.de>
On Wed, Aug 20, 2025 at 06:26:21PM +0200, Sebastian Andrzej Siewior wrote:
> The problem is usually that nobody knows why exactly interrupts are
> disabled an what purpose it serves. Often the reasons is no longer there
> but the code still does it.
Indeed, that seems to be the problem in several places here.
> > More to the point, out of all the possible reasons why $SOMETHING might
> > be invoked with disabled interrupts, which of these reasons remain valid
> > in RT builds and which don't?
>
> None (in most cases) because interrupt handler are threaded. So
> interrupts are never truly disabled.
> Adding the macros as you suggest would gain probably three users:
> - inode
> - dummy_hcd
> - vhci-hcd
>
> Instead I would:
> - vhci I would suggest to remove the disabling and move its completion
> to BH.
Agreed. But it's up to the maintainer.
> - dummy_hcd I would suggest to either do the thing you called silly or
> audit the gadgets and remove it.
Auditing is the best approach. It would be a lot of work, though.
Also, it's worth noting that other UDC drivers do use the
spin_lock_irqsave();
...
spin_unlock();
usb_gadget_giveback_request();
spin_lock();
...
spin_unlock_irqrestore();
scheme, so using it in dummy_hcd would be reasonable.
> - inode I would suggest to keep it as-is and audit it properly later
> once someone intends to use it. It would also give the opportunity to
> clean up the commented locking statement.
I don't know if anyone is using AIO with gadgetfs any more. I've never
seen any applications for it other than to test the implementation.
Alan Stern
prev parent reply other threads:[~2025-08-20 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 1:29 Yunseong Kim
2025-08-16 1:47 ` Yunseong Kim
2025-08-16 1:51 ` Alan Stern
2025-08-16 2:18 ` Yunseong Kim
2025-08-16 14:16 ` Alan Stern
2025-08-17 14:27 ` Alan Stern
2025-08-19 11:04 ` Sebastian Andrzej Siewior
2025-08-19 14:12 ` Alan Stern
2025-08-19 14:57 ` Sebastian Andrzej Siewior
2025-08-19 15:44 ` Alan Stern
2025-08-20 16:26 ` Sebastian Andrzej Siewior
2025-08-20 20:53 ` Alan Stern [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=f632babc-6f66-4ccc-93f8-1558fbcdeb08@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
--cc=syzkaller@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=ysk@kzalloc.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®