On Fri, 18 May 2001, Pete Zaitcev wrote:
>On Fri, May 18, 2001 at 06:44:07AM -0700, David Brownell wrote:
>> What's so bad about freeing inside a callback? When else
>> would most drivers have all the facts in hand, so they know
>> that they're done using a given URB? Inquiring minds ...
>
>Short answer is "too confusing". I am sure Dan did a due dilligence
>looking at code paths and yet he blew it (I would too...).
>The fact that the technique is unconventional does not help.
I can't see why the urb's spinlock is being held at all at that point,
especially if it's going to be possibly freed.
I still think leaving it held like it is will cause problems in the future.
>I saw how Dan proposes freeing from a BH. That would be
>wasteful, I think. What next, a tasklet? We saw that too :)
>[I am talking about Mr. Ananian's exercises]
Not sure what the reference is but why is a BH wasteful? Just curious.
>As far as spinlocking goes, I strongly disagree with an idea
>to keep a lock across a calback, then perhaps unlock before
>we free. A better way would be to have a logics that allows
>to unlock before a callback.
I agree.
--
Dan Streetman
[EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel