On Sun, Nov 04, 2001 at 07:36:32PM -0500, Pete Zaitcev wrote:
> 
> In case of skeleton driver, the play is little different,
> because usage counters are involved. They protect us from
> doble deletion, and the lock only serves to ensure the
> integrity of the counter. The code in 2.4.13 seems to be
> a little buggy, that's all. Perhaps this should be done:
> 
> --- linux-2.4.13-ac2/drivers/usb/usb-skeleton.c       Mon Oct  1 13:45:48 2001
> +++ linux-2.4.13-ac2-e/drivers/usb/usb-skeleton.c     Sun Nov  4 16:35:06 2001@@ 
>-604,6 +604,7 @@
>  
>       /* if the device is not opened, then we clean up right now */
>       if (!dev->open_count) {
> +             up (&dev->sem);
>               skel_delete (dev);
>       } else {
>               dev->udev = NULL;
> 

Ah, good catch.  This helps a lot, I'll go add this patch to the tree.

As to the overall issue of disconnects and reference counting, much of
this is going to be revisited in 2.5, hopefully fixing the remaining
race conditions, and documenting the whole thing.

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to