diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-15 08:49:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-15 09:23:49 +0200 |
commit | 1f4a10cb826fdec5cd442df010bcb3043bfd6464 (patch) | |
tree | 8dfb9a47b8a84407bd70ce0335eeac93c1180179 | |
parent | 266ee8e06d5baa186a0b5b8727eb99ae2d00dc9c (diff) |
Revert "usb: xhci: prevent potential failure in handle_tx_event() for Transfer events without TRB"
This reverts commit 948554f1bb16e15b90006c109c3a558c66d4c4ac which is
commit 66cb618bf0bb82859875b00eeffaf223557cb416 upstream.
In backporting it to stable kernels, it causes a severe regression on
many systems, so revert it for now.
Reported-by: Tim Lewis <elatllat@gmail.com>
Link: https://lore.kernel.org/r/CA+3zgmvct7BWib9A7O1ykUf=0nZpdbdpXBdPWOCqfPuyCT3fug@mail.gmail.com
Reported-by: <matthias@bodenbinder.de>
Link: https://lore.kernel.org/r/bug-219039-208809@https.bugzilla.kernel.org/
Cc: Niklas Neronin <niklas.neronin@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: MichaĆ Pecio <michal.pecio@gmail.com>
Cc: <ZeroBeat@gmx.de>
Cc: Salvatore Bonaccorso <carnil@debian.org>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index be5b0ff2966f..7549c430c4f0 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2631,17 +2631,16 @@ static int handle_tx_event(struct xhci_hcd *xhci, else xhci_handle_halted_endpoint(xhci, ep, 0, NULL, EP_SOFT_RESET); - break; + goto cleanup; case COMP_RING_UNDERRUN: case COMP_RING_OVERRUN: case COMP_STOPPED_LENGTH_INVALID: - break; + goto cleanup; default: xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n", slot_id, ep_index); goto err_out; } - return 0; } /* Count current td numbers if ep->skip is set */ |