aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2018-01-29 15:26:40 -0500
committerJason Gunthorpe <jgg@mellanox.com>2018-01-30 11:30:00 -0500
commite7996a9a77fc669387da43ff4823b91cc4872bd0 (patch)
tree617f0a128e222539d67e8cccc359f1bc4b984900 /drivers/usb/core/devio.c
parentb5fa635aab8f0d39a824c01991266a6d06f007fb (diff)
parentd8a5b80568a9cb66810e75b182018e9edb68e8ff (diff)
Merge tag v4.15 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
To resolve conflicts in: drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/qp.c From patches merged into the -rc cycle. The conflict resolution matches what linux-next has been carrying. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 705c573d0257..a3fad4ec9870 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1442,14 +1442,18 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
1442 int number_of_packets = 0; 1442 int number_of_packets = 0;
1443 unsigned int stream_id = 0; 1443 unsigned int stream_id = 0;
1444 void *buf; 1444 void *buf;
1445 1445 unsigned long mask = USBDEVFS_URB_SHORT_NOT_OK |
1446 if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP |
1447 USBDEVFS_URB_SHORT_NOT_OK |
1448 USBDEVFS_URB_BULK_CONTINUATION | 1446 USBDEVFS_URB_BULK_CONTINUATION |
1449 USBDEVFS_URB_NO_FSBR | 1447 USBDEVFS_URB_NO_FSBR |
1450 USBDEVFS_URB_ZERO_PACKET | 1448 USBDEVFS_URB_ZERO_PACKET |
1451 USBDEVFS_URB_NO_INTERRUPT)) 1449 USBDEVFS_URB_NO_INTERRUPT;
1452 return -EINVAL; 1450 /* USBDEVFS_URB_ISO_ASAP is a special case */
1451 if (uurb->type == USBDEVFS_URB_TYPE_ISO)
1452 mask |= USBDEVFS_URB_ISO_ASAP;
1453
1454 if (uurb->flags & ~mask)
1455 return -EINVAL;
1456
1453 if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX) 1457 if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX)
1454 return -EINVAL; 1458 return -EINVAL;
1455 if (uurb->buffer_length > 0 && !uurb->buffer) 1459 if (uurb->buffer_length > 0 && !uurb->buffer)