Here's the sequence: - serial_disconnect in - serial_disconnect acquires per-port semaphore - serial_write in - serial_write sleeps on semaphore - serial_disconnect sets driver_data = NULL (but _write is already in!) - serial_disconnect releases semaphore *** - serial_disconnect frees memory containing semaphore - serial_write... ?? appears like it never wakes up
The fix is to make sure that the sleeping semaphore holders run to completion at the point where *** is, except that I can't seem to force that to happen. Neither schedule() nor yield() causes serial_disconnect to give up running so that the holders can run. Are device disconnect routines run in interrupt context? What happens when a semaphore is freed from under a sleeping holder? Is there a better fix that I don't see? ..Stu ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel