Re: [PATCH v3 1/2] staging: dwc2: validate urb->actual_length for OUT endpoints

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

 



Hi folks,

On Tue, Sep 24, 2013 at 11:08:53AM -0500, Felipe Balbi wrote:
> > > On Mon, Sep 23, 2013 at 02:23:33PM -0700, Paul Zimmerman wrote:
> > > > +	if ((urb->actual_length < 0 || urb->actual_length > urb->length) &&
> > > > +	    !dwc2_hcd_is_pipe_in(&urb->pipe_info))
> > > > +		urb->actual_length = urb->length;
> >
> > I assume it was to fix some issue seen by our developers. We don't have
> > detailed commit logs for that driver, so I am unable to say for certain.
> > But since it is part of the downstream RaspberryPi driver, which has
> > seen a lot of testing, I thought it best to include it.
> 
> Maybe RPi folks can give some details ? Because I really wonder if we'd
> not be masking a bug somewhere else and this would make it a lot harder
> to pin-point that bug.

Agreed. Perhaps there should be a message printed or a WARN() there so
we can pinpoint in which cases this case actually occurs?

Paul, did you see if this case actually triggers with your hardware?

Gr.

Matthijs

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux