mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 13:41:55 +00:00
58f2fcb3a8
The interrupt service routine registered for the gadget is a primary
handler which mask the interrupt source and a threaded handler which
handles the source of the interrupt. Since the threaded handler is
voluntary threaded, the IRQ-core does not disable bottom halves before
invoke the handler like it does for the forced-threaded handler.
Due to changes in networking it became visible that a network gadget's
completions handler may schedule a softirq which remains unprocessed.
The gadget's completion handler is usually invoked either in hard-IRQ or
soft-IRQ context. In this context it is enough to just raise the softirq
because the softirq itself will be handled once that context is left.
In the case of the voluntary threaded handler, there is nothing that
will process pending softirqs. Which means it remain queued until
another random interrupt (on this CPU) fires and handles it on its exit
path or another thread locks and unlocks a lock with the bh suffix.
Worst case is that the CPU goes idle and the NOHZ complains about
unhandled softirqs.
Disable bottom halves before acquiring the lock (and disabling
interrupts) and enable them after dropping the lock. This ensures that
any pending softirqs will handled right away.
cc: stable@vger.kernel.org
Fixes:
|
||
---|---|---|
.. | ||
cdns3-debug.h | ||
cdns3-ep0.c | ||
cdns3-gadget.c | ||
cdns3-gadget.h | ||
cdns3-imx.c | ||
cdns3-pci-wrap.c | ||
cdns3-plat.c | ||
cdns3-starfive.c | ||
cdns3-ti.c | ||
cdns3-trace.c | ||
cdns3-trace.h | ||
cdnsp-debug.h | ||
cdnsp-ep0.c | ||
cdnsp-gadget.c | ||
cdnsp-gadget.h | ||
cdnsp-mem.c | ||
cdnsp-pci.c | ||
cdnsp-ring.c | ||
cdnsp-trace.c | ||
cdnsp-trace.h | ||
core.c | ||
core.h | ||
drd.c | ||
drd.h | ||
gadget-export.h | ||
host-export.h | ||
host.c | ||
Kconfig | ||
Makefile |