diff options
| author | Niklas Neronin <niklas.neronin@linux.intel.com> | 2026-11-05 19:51:06 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-11-05 16:01:00 -0500 |
| commit | 3149e8b3237f58d4dd440fc64c45c93404c4b064 (patch) | |
| tree | 57e128f978c08cda709cb0333a2e83f35987d1c5 /kernel/debug/debug_core.h | |
| parent | d1ec1859f3b8641e3e5c5953cc7dd8e63b54339f (diff) | |
usb: xhci: fix 'num_active_eps' accounting on allocation failure
For controllers affected by XHCI_EP_LIMIT_QUIRK, endpoint resources for
the default control endpoint are accounted before the virtual device is
allocated.
If xhci_alloc_virt_device() fails, the slot is disabled and cleanup is
handled through the Disable Slot completion path. However, because no
virtual device is installed in 'xhci->devs', the endpoint accounting
is never released and 'num_active_eps' remains incremented.
As a result, each allocation failure leaks one endpoint from the
driver's accounting.
Fix this by undoing the endpoint reservation when virtual device
allocation fails.
Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20261105175106.241182-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/debug/debug_core.h')
0 files changed, 0 insertions, 0 deletions
