Am Freitag, 10. Januar 2003 11:29 schrieb Duncan Sands:
> On Friday 10 January 2003 00:28, Oliver Neukum wrote:
> > > static void __exit udsl_usb_cleanup (void)
> > > {
> > > - /* killing threads */
> > > - udsl_atm_sar_stop ();
> > > usb_deregister (&udsl_usb_driver);
> >
> > Not quite. You need to make sure that no tasklet is running.
>
> 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.
Regards
Oliver
-------------------------------------------------------
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