Re: [PATCH ver 2] USB: usbmon: fix bug in mon_buff_area_shrink

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

 



On Wed, 4 Nov 2009 11:35:53 -0500 (EST), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> CC: Pete Zaitcev <zaitcev@xxxxxxxxxx>

Acked-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>

> -			ep->len_cap = 0;
> -			mon_buff_area_shrink(rp, length);
> +			delta = (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1);
> +			ep->len_cap -= length;
> +			delta -= (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1);
> +			mon_buff_area_shrink(rp, delta);

Makes complete sense to me (after I drew a little picture of
the layout of the buffer ^_^).

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