diff options
author | Dave Airlie <airlied@redhat.com> | 2019-11-14 05:53:10 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2019-11-14 05:53:10 +1000 |
commit | 77e0723bd27f830d0903225372aa778fe2975648 (patch) | |
tree | 4c035783e014b3a0ac9174390f88dc75150533e4 /drivers/usb/core/config.c | |
parent | Merge tag 'drm-misc-next-fixes-2019-11-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff) | |
parent | Linux 5.4-rc7 (diff) | |
download | linux-dev-77e0723bd27f830d0903225372aa778fe2975648.tar.xz linux-dev-77e0723bd27f830d0903225372aa778fe2975648.zip |
Merge v5.4-rc7 into drm-next
We have the i915 security fixes to backmerge, but first
let's clear the decks for other drivers to avoid a bigger
mess.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/usb/core/config.c')
-rw-r--r-- | drivers/usb/core/config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 151a74a54386..1ac1095bfeac 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -348,6 +348,11 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, /* Validate the wMaxPacketSize field */ maxp = usb_endpoint_maxp(&endpoint->desc); + if (maxp == 0) { + dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has wMaxPacketSize 0, skipping\n", + cfgno, inum, asnum, d->bEndpointAddress); + goto skip_to_next_endpoint_or_interface_descriptor; + } /* Find the highest legal maxpacket size for this endpoint */ i = 0; /* additional transactions per microframe */ |