Am Freitag, 1. Dezember 2006 22:18 schrieb Greg KH:
> On Fri, Dec 01, 2006 at 01:37:22PM -0700, David Lopez wrote:
> > From: David Lopez <[EMAIL PROTECTED]>
> > +/* Private defines */
> > +#define MAX_TRANSFER ( PAGE_SIZE - 512 )
>
> Any specific reason for this size limit?
It is taken from the skeleton driver. It prevents multi order allocations.
512 is the maximum packet size of UHCI.
> > + /* free up our allocated buffer */
> > + usb_buffer_free(urb->dev, urb->transfer_buffer_length,
> > + urb->transfer_buffer, urb->transfer_dma);
> > + up(&dev->sem);
>
> You hold the semaphore over the urb lifecycle? Why? That seems a bit
> "odd".
Again taken from the skeleton driver. The number of URBs in flight must
be limited or you have a DoS security problem.
> Or is this a bug?
>
> Can't that semaphore be a mutex instead?
Being upped from a completion handler, it can't be.
Regards
Oliver
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel