History

USB: devio: fix issue with log flooding

usbfs allows user space to pass down an URB which sets URB_SHORT_NOT_OK for output URBs. That causes usbcore to log messages without limit for a nonsensical disallowed combination. The fix is to silently drop the attribute in usbfs. The problem is reported to exist since 3.14 https://www.virtualbox.org/ticket/13085

Oliver Neukum committed 12 years ago

Commit d310d051 parent 43508be1 file · +1 −1Browse files

Unified · Split

drivers/usb/core/devio.c+1−1
@@ -1509,7 +1509,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb · 1508 unmodified lines
1509 u = (is_in ? URB_DIR_IN : URB_DIR_OUT);1509 u = (is_in ? URB_DIR_IN : URB_DIR_OUT);
1510 if (uurb->flags & USBDEVFS_URB_ISO_ASAP)1510 if (uurb->flags & USBDEVFS_URB_ISO_ASAP)
1511 u |= URB_ISO_ASAP;1511 u |= URB_ISO_ASAP;
1512 if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK)1512 if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK && is_in)
1513 u |= URB_SHORT_NOT_OK;1513 u |= URB_SHORT_NOT_OK;
1514 if (uurb->flags & USBDEVFS_URB_NO_FSBR)1514 if (uurb->flags & USBDEVFS_URB_NO_FSBR)
1515 u |= URB_NO_FSBR;1515 u |= URB_NO_FSBR;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t