From: Masakazu Mokuno <mokuno.masakazu@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org,
Mathias Nyman <mathias.nyman@linux.intel.com>,
linux-stable <stable@vger.kernel.org>
Subject: USB: core: Fix misuse of USB_DT_USB_SSP_CAP_SIZE()
Date: Fri, 12 Jan 2018 00:47:53 +0900 [thread overview]
Message-ID: <20180112004750.C03B.F48FD4B1@gmail.com> (raw)
Hi,
On Tue, 9 Jan 2018 16:06:41 +0100
Greg KH <gregkh@linuxfoundation.org> 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 <stable@vger.kernel.org>
> > Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
> > Signed-off-by: Masakazu Mokuno <masakazu.mokuno@gmail.com>
> >
> > --
> >
> > 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.
WARNING: multiple messages have this Message-ID (diff)
From: Masakazu Mokuno <mokuno.masakazu@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org,
Mathias Nyman <mathias.nyman@linux.intel.com>,
linux-stable <stable@vger.kernel.org>
Subject: Re: [PATCH] USB: core: Fix misuse of USB_DT_USB_SSP_CAP_SIZE()
Date: Fri, 12 Jan 2018 00:47:53 +0900 [thread overview]
Message-ID: <20180112004750.C03B.F48FD4B1@gmail.com> (raw)
In-Reply-To: <20180109150641.GA11123@kroah.com>
Hi,
On Tue, 9 Jan 2018 16:06:41 +0100
Greg KH <gregkh@linuxfoundation.org> 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 <stable@vger.kernel.org>
> > Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
> > Signed-off-by: Masakazu Mokuno <masakazu.mokuno@gmail.com>
> >
> > --
> >
> > 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
next reply other threads:[~2018-01-11 15:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 15:47 Masakazu Mokuno [this message]
2018-01-11 15:47 ` [PATCH] USB: core: Fix misuse of USB_DT_USB_SSP_CAP_SIZE() Masakazu Mokuno
-- strict thread matches above, loose matches on Subject: below --
2018-01-09 15:06 Greg Kroah-Hartman
2018-01-09 15:06 ` [PATCH] " Greg KH
2017-12-19 18:14 Masakazu Mokuno
2017-12-19 18:14 ` [PATCH] " Masakazu Mokuno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180112004750.C03B.F48FD4B1@gmail.com \
--to=mokuno.masakazu@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.