Re: [PATCH] devio: fix issue with log flooding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-08-01 at 10:24 -0400, Alan Stern wrote:
> On Fri, 1 Aug 2014, Oliver Neukum wrote:
> 
> > 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
> > 
> > Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
> > CC: stable@xxxxxxxxxxxxxxx
> > ---
> >  drivers/usb/core/devio.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> > index 257876e..0b59731 100644
> > --- a/drivers/usb/core/devio.c
> > +++ b/drivers/usb/core/devio.c
> > @@ -1509,7 +1509,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
> >  	u = (is_in ? URB_DIR_IN : URB_DIR_OUT);
> >  	if (uurb->flags & USBDEVFS_URB_ISO_ASAP)
> >  		u |= URB_ISO_ASAP;
> > -	if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK)
> > +	if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK && is_in)
> >  		u |= URB_SHORT_NOT_OK;
> >  	if (uurb->flags & USBDEVFS_URB_NO_FSBR)
> >  		u |= URB_NO_FSBR;
> 
> Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 
> Do you want to put in a one-time warning, so that people will be aware 
> of these mistakes and are motivated to fix them?

We used to allow this silently. And the combination is not really
harmful, only sort of redundant. Was that a genuine question or a
request?

	Regards
		Oliver



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux