From: "David Brownell" <[EMAIL PROTECTED]> > > What happens when a semaphore is freed from under a sleeping holder? > Bad Stuff. It's not legal. Oopses could happen ...
Including the sleeping holder never waking up? 'Cause I saw that too. > Basically you need to decouple some "disconnect" processing > from the "last close". The drivers that do this right are > the ones where (a) disconnect does only a partial cleanup > when the device is still open, but (b) when that open fd is > closed, the rest of that cleanup is done. How does one link those? Ah. _disconnect runs, but eventually serial_close will be called when the user space fd gets closed right? If so, this breaks my understanding that when _disconnect is finished the driver must be ready for unloading. Is that not true then? > That cleanup that's deferred till the last instant needs to > include freeing the driver's per-device memory, including > that semaphore. If I understand what you're trying to say > about that race scenario, it's that issue I believe you do, because you're making sense to me. ..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