On Mon, Jun 23, 2003 at 08:39:33PM +0300, Tuukka Toivonen wrote:
> Can usb_disconnect() and usb_probe() functions of a driver pre-empt the
> driver in other parts? I mean, that if user has just called my open()
> function in the driver, could usb_disconnect() happen before the system
> call returns?

Yes.

> 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.

Yup.

> So I guess it is not possible, but I'd like to have a confirmation. Also
> if somebody would care to explain a little why it isn't possible, would be
> nice.

It is possible, you need to make sure it will not cause bad things to
happen in your driver :)

Hope this helps,

greg k-h


-------------------------------------------------------
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