On Sun, 19 Sep 2004, David Brownell wrote: > On Saturday 18 September 2004 8:18 pm, Alan Stern wrote: > > > The "known bug" is that when an HCD module is rmmod'ed it doesn't wait for > > all the USB device refcounts to go to 0 -- but when they do a routine in > > the HCD is called to release some memory. > > That should be nearly fixable now, if it isn't already. The endpoint disable > work got rid of all "live" state (connected to the hardware), so there should > be no reason not to tell the HCD to get rid of any per-device memory they > may have allocated, after all the drivers have disconnected.
I'm referring to the bus->release() callback in hcd.c:usb_host_release(), which invokes hcd_pci_release(), which calls the controller driver's hcd_free(). In the UHCI driver all this does is deallocate the memory for the private data structure; I don't know what it does in other drivers. But what if a user process is holding the class device's sysfs file open? Won't that end up referring back to the struct class_device embedded in the private data structure? It seems to me that you really don't want to deallocate that memory before its refcount goes to 0. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
