Am Mittwoch, 25. Juni 2003 14:33 schrieb Tuukka Toivonen:
> On Mon, 23 Jun 2003, Oliver Neukum wrote:
> >> >> If usb_disconnect() can happen while already executing in open(), and
> >> >> if the former frees the data structures used by the driver, then the
> >> >> latter call might continue working with already freed memory region
> >> >> which could lead to catastrophe.
> >
> >Exactly. Very good. Therefore you must never free [in usb_disconnect()
> > -tt] the lock and that piece of data (usually a pointer to a device
> > descriptor)
>
> Thank you very much. These were the magic words I wanted to hear. So the
> solution is to use _static_ lock.
>
> >Many examples can be found in the kernel sources.
>
> Right. So let's look at drivers/usb/ov511.c (2.4.21).

Somebody has broken the USB v4l drivers in the disconnect path
by changing drivers/media/video/videodev.c
In earlier times deregistering a v4l ensured that the driver would not
be called into after the call returned. Somebody changed that and hasn't
fixed the drivers.

        Regards
                Oliver



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to