USB: core: Fix misuse of USB_DT_USB_SSP_CAP_SIZE()
Subsystems (2)
Greg Kroah-Hartman
maintainerQuoted 34 lines · Masakazu Mokuno
As
USB_DT_USB_SSP_CAP_SIZE()takes SSAC value as an argument, the low bound of the size for structusb_ssp_cap_descriptorshould be described byUSB_DT_USB_SSP_CAP_SIZE(0), not byUSB_DT_USB_SSP_CAP_SIZE(1)The type-specific length check patch was added to stable and needs to be fixed as well.
Fixes 81cf4a45360f ("USB: core: Add type-specific length check of BOSdescriptors")
Cc linux-stable <[email protected]>Cc Mathias Nyman <[email protected]>Signed-off-by Masakazu Mokuno <[email protected]>Signature · 2 lines
drivers/usb/core/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/core/config.c +1
-1@@ -911,7 +911,7 @@ void usb_release_bos_descriptor(struct usb_device *dev) [USB_CAP_TYPE_WIRELESS_USB] = USB_DT_USB_WIRELESS_CAP_SIZE, [USB_CAP_TYPE_EXT] = USB_DT_USB_EXT_CAP_SIZE, [USB_SS_CAP_TYPE] = USB_DT_USB_SS_CAP_SIZE, - [USB_SSP_CAP_TYPE] = USB_DT_USB_SSP_CAP_SIZE(1), + [USB_SSP_CAP_TYPE] = USB_DT_USB_SSP_CAP_SIZE(0), [CONTAINER_ID_TYPE] = USB_DT_USB_SS_CONTN_ID_SIZE, [USB_PTM_CAP_TYPE] = USB_DT_USB_PTM_ID_SIZE, };Signature · 2 lines
-- Masakazu Mokuno
Patch is corrupted and can not be applied :(