From: sashiko-bot@kernel.org
To: "Ryan Brue" <ryanbrue.dev@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: mtu3: disable bottom halves in the threaded interrupt handler
Date: Wed, 04 Nov 2026 11:45:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-197209@kernel.org> (raw)
In-Reply-To: <20261104-usb-mtu3-gadget-completion-callback-fix-v2-1-2769533a39cb@gmail.com>
> mtu3_irq() is a threaded handler, so it runs in process context, and it
> takes mtu->lock with spin_lock_irqsave(). mtu3_req_complete() drops the
> lock with a plain spin_unlock() around usb_gadget_giveback_request(), so
> the gadget function's completion callback runs with interrupts disabled,
> as the gadget API promises, but in neither hardirq nor softirq context.
>
> That breaks any callback that reaches netif_rx(). netif_rx() disables
> bottom halves itself when it is called outside hardirq and softirq
> context, and enabling them again with interrupts disabled is not
> allowed:
>
> WARNING: kernel/softirq.c:453 at __local_bh_enable_ip+0x128/0x134
> __local_bh_enable_ip
> netif_rx
> rx_complete [u_ether]
> [ ... ]
> names. The same copy is reliable with this change applied.
>
> Fixes: 13118959cb1a ("usb: mtu3: register mtu3_irq by threaded irq")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-usb-mtu3-gadget-completion-callback-fix-v2-1-2769533a39cb@gmail.com?part=1
prev parent reply other threads:[~2026-11-04 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 11:42 [PATCH v2] usb: mtu3: disable bottom halves in the threaded interrupt handler Ryan Brue
2026-11-04 11:45 ` sashiko-bot [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=sashiko-outbox-197209@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ryanbrue.dev@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.