Re: patch usb-usbmon-fix-bug-in-mon_buff_area_shrink.patch added to gregkh-2.6 tree

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

 



On Wed, 28 Oct 2009 14:51:50 -0400 (EDT), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 28 Oct 2009, Pete Zaitcev wrote:

> > > -			mon_buff_area_shrink(rp, length);
> > > +			mon_buff_area_shrink(rp, length,
> > > +					length + PKT_SIZE + lendesc);
> > 
> > This looks completely wrong, because by the time we're shrinking
> > the area (rp), it must have been set up already, with the data
> > tacked at the end. Anything else means that the integrity of the
> > circular buffer is lost! Therefore, it should be possible to
> > shrink the rp using the data length as a guide, regardless of
> > ISO descriptors.
> 
> Perhaps my description of the changes wasn't explicit enough.

It was a fine description, but I mixed up rp and ep. Only the
latter has all the necessary information. Sorry.

I posted an alternative patch to linux-usb, please have a look.
It's actually your patch (same calculations) only corrected
for architectural intangibles like what function does what.

-- Pete
--
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