diff options
-rw-r--r-- | drivers/usb/core/devio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 545da37afca7..04f7504e0985 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -923,8 +923,8 @@ static int proc_do_submiturb(struct dev_state *ps, struct usbdevfs_urb *uurb, | |||
923 | if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | 923 | if ((ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) |
924 | != USB_ENDPOINT_XFER_CONTROL) | 924 | != USB_ENDPOINT_XFER_CONTROL) |
925 | return -EINVAL; | 925 | return -EINVAL; |
926 | /* min 8 byte setup packet, max arbitrary */ | 926 | /* min 8 byte setup packet, max 8 byte setup plus an arbitrary data stage */ |
927 | if (uurb->buffer_length < 8 || uurb->buffer_length > PAGE_SIZE) | 927 | if (uurb->buffer_length < 8 || uurb->buffer_length > (8 + MAX_USBFS_BUFFER_SIZE)) |
928 | return -EINVAL; | 928 | return -EINVAL; |
929 | if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL))) | 929 | if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL))) |
930 | return -ENOMEM; | 930 | return -ENOMEM; |