> 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.
It all depends on the semantics of usb_unlink_urb. Consider the patch below. Is this any better? Maybe not: if usb_unlink_urb returns before the completion handler (running on another CPU) reaches the tasklet_schedule statement, then what is to stop the tasklet being scheduled by the completion handler after the tasklet_kill? Nothing. So it all depends on whether or not usb_unlink_urb guarantees that the completion handler has finished running before it (usb_unlink_urb) returns. Ciao, Duncan. speedtouch: kill receive queue tasklet on shutdown. speedtouch.c | 2 ++ 1 files changed, 2 insertions(+) diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Fri Jan 10 13:10:47 2003 +++ b/drivers/usb/misc/speedtouch.c Fri Jan 10 13:10:47 2003 @@ -775,6 +775,8 @@ ctx->skb = NULL; } + tasklet_kill (&instance->recvqueue_tasklet); + for (i = 0; i < UDSL_NUMBER_SND_URBS; i++) { struct udsl_usb_send_data_context *ctx = &(instance->send_ctx[i]); ------------------------------------------------------- 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