mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
USB: usbdevfs: restore warning for nonsensical flags
If we filter flags before they reach the core we need to generate our
own warnings.
Signed-off-by: Oliver Neukum <[email protected]>
Fixes: 0cb54a3e47 ("USB: debugging code shouldn't alter control flow")
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
7a68d9fb85
commit
81e0403b26
1 file changed
+5
@@ -1697,6 +1697,11 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
|
||||
u |= URB_NO_INTERRUPT;
|
||||
as->urb->transfer_flags = u;
|
||||
|
||||
if (!allow_short && uurb->flags & USBDEVFS_URB_SHORT_NOT_OK)
|
||||
dev_warn(&ps->dev->dev, "Requested nonsensical USBDEVFS_URB_SHORT_NOT_OK.\n");
|
||||
if (!allow_zero && uurb->flags & USBDEVFS_URB_ZERO_PACKET)
|
||||
dev_warn(&ps->dev->dev, "Requested nonsensical USBDEVFS_URB_ZERO_PACKET.\n");
|
||||
|
||||
as->urb->transfer_buffer_length = uurb->buffer_length;
|
||||
as->urb->setup_packet = (unsigned char *)dr;
|
||||
dr = NULL;
|
||||
|
||||
Reference in new issue
Block a user