Files
linux/drivers/usb/gadget/udc
Seungjin Bae 7d9633528d usb: gadget: dummy_hcd: Reject hub port requests for non-existent ports
The `dummy_hub_control()` function handles USB hub class requests
to the virtual root hub. The `GetPortStatus` case returns -EPIPE for
requests with `wIndex != 1`, since the virtual root hub has only a
single port. However, the `ClearPortFeature` and `SetPortFeature`
cases lack the same check.

Fix this by extending the `wIndex != 1` rejection to both cases,
matching the existing behavior of `GetPortStatus`.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable <[email protected]>
Suggested-by: Alan Stern <[email protected]>
Signed-off-by: Seungjin Bae <[email protected]>
Reviewed-by: Alan Stern <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2026-05-22 11:13:31 +02:00
..
…
2025-04-11 16:11:25 +02:00
2025-04-11 16:11:25 +02:00
…
…