On Friday 10 January 2003 12:01, Oliver Neukum wrote:
> > Hi Oliver, thanks for looking the patch over.  I thought about this issue
> > and came to the conclusion that the tasklet cannot be running.  The
> > reason is as follows: the tasklet is only scheduled in the completion
> > handler udsl_usb_data_receive (and only when status is normal).  This
> > is in_interrupt() so the tasklet is run before returning from the
> > interrupt (see softirq.c).  Thus at worst the tasklet will have finished
> > running by the following point (udsl_usb_data_exit):
> >
> >         /* destroy urbs */
> >         for (i = 0; i < UDSL_NUMBER_RCV_URBS; i++) {
> >                 struct udsl_data_ctx *ctx = &(instance->rcvbufs[i]);
> >
> >                 if ((!ctx->urb) || (!ctx->skb))
> >                         continue;
> >
> >                 usb_unlink_urb (ctx->urb);
> > <======== HERE
> >                 usb_free_urb (ctx->urb);
> >                 kfree_skb (ctx->skb);
> >                 ctx->skb = NULL;
> >         }
> >
> > And this is OK.  Do you agree?
>
> I am afraid I do not agree. Your reasoning is correct only on UP.
> If the code in question runs on another CPU, you are in trouble.

Does usb_unlink_urb guarantee that the completion handler has
finished before it returns?

Ciao,

Duncan.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to