From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:43645 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932468AbeAKPrx (ORCPT ); Thu, 11 Jan 2018 10:47:53 -0500 From: Masakazu Mokuno Date: Fri, 12 Jan 2018 00:47:53 +0900 To: Greg KH Subject: Re: [PATCH] USB: core: Fix misuse of USB_DT_USB_SSP_CAP_SIZE() Cc: linux-usb@vger.kernel.org, Mathias Nyman , linux-stable In-Reply-To: <20180109150641.GA11123@kroah.com> References: <20171220031406.9B5E.F48FD4B1@gmail.com> <20180109150641.GA11123@kroah.com> Message-Id: <20180112004750.C03B.F48FD4B1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: Hi, On Tue, 9 Jan 2018 16:06:41 +0100 Greg KH wrote: > On Wed, Dec 20, 2017 at 03:14:09AM +0900, Masakazu Mokuno wrote: > > As USB_DT_USB_SSP_CAP_SIZE() takes SSAC value as an argument, the low > > bound of the size for struct usb_ssp_cap_descriptor should be described > > by USB_DT_USB_SSP_CAP_SIZE(0), not by USB_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 BOS > > descriptors") > > Cc: linux-stable > > Cc: Mathias Nyman > > Signed-off-by: Masakazu Mokuno > > > > -- > > > > drivers/usb/core/config.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c > > index 78e92d2..33a3ab7 100644 > > --- a/drivers/usb/core/config.c > > +++ b/drivers/usb/core/config.c > > @@ -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, > > }; > > > > -- > > Masakazu Mokuno > > Patch is corrupted and can not be applied :( I'm sorry. Tabs were expaned to white spaces. I'll resend fixed patch. -- Masakazu Mokuno