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/