Hi...
Looking at the Linux USB code (2.4.3) and I wonder why I dont have to acquire
any locks to access the usb_device structs.
When the device is disconnected in usb_disconnect() the usb_device struct is
freed, but no one prevents code that already has a pointer to it to access
it. And usb_hub_port_connect_change() in hub.c puts the new device into the
parent's children array before it's initialization is finished, so that
there is a device with incomplete initialization in the tree for a few
cycles.
Even though the usb_device structs are so volatile usb/devices.c does not use
any locks when accessing the usb_device structs. Is it tolerated that the
behaviour of the proc files is inpredictable and reading may crash during a
hot-plug action in SMP or preemtible kernels, am I missing something or is
this a simple bug/todo?
bye...
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel