Re: orinoco_usb Request For Comments

Manuel Estrada Sainz (ranty-bulk@ranty.pantax.net)
Fri, 27 Jun 2003 01:09:33 +0200


On Thu, Jun 26, 2003 at 11:41:18PM +0200, Oliver Neukum wrote:
>
> > Please comment, how much of that or what else needs to be done to get
> > it in the kernel?
>
> if(dev->read.urb->status == -EINPROGRESS){
> warn("%s: Unlinking pending IN urb", __FUNCTION__);
> retval = bridge_remove_in_urb(dev);
> if(retval){
> dbg("retval %d status %d", retval,
> dev->read.urb->status);
> }
> }
>
> Unlink unconditionally.

OK, done.

> /* We don't like racing :) */
> ctx->outurb->transfer_flags &= ~URB_ASYNC_UNLINK;
> usb_unlink_urb(ctx->outurb);
> del_timer_sync(&ctx->timer);
>
> But neither do we like sleeping in interrupt. You can't simply unset the flag
> if somebody else may be needing it.

mmm, but the problem is that the interrupt handler can rearm the timer.
And it can also complete the request_context freeing the memory, and we
don't want to free the memory twice or access freed memory.

Suggestions on how to get this right would be greatly appreciated.

Maybe more paranoid refcounting?

> More when I am rested :-)

Thanks a lot, I was really missing some peer review.

Manuel

-- 
--- Manuel Estrada Sainz <ranty@debian.org>
                         <ranty@bigfoot.com>
			 <ranty@users.sourceforge.net>
------------------------ <manuel.estrada@hispalinux.es> -------------------
Let us have the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/