On Sun, 19 Oct 2003, Andrei Lahun wrote: > Hello . I just found out that with latest 2.6 test i have hard lock when > i remove my Alcatel USB cable. I managed to found a reason: when i > remove cable - usb_disconnect function called which call > usb_disable_device at the same time usbdefvs try to free some internal > data and call usbdev_release , so what is happen inside > usb_disable_device we put dev->actconfig=0 and at the same time we use > dev->actconfig(assuming itis not NULL) in releaseintf. as a result we > have oops inside interrupt and PC is dead. Fix is to remove > dev->actconfig=0 from usb_disable_device. For me after this patch > everything is working properly.
No, usb_disable_device() _must_ set dev->actconfig = 0. The proper fix is to change releaseintf() -- and maybe some other routines in the usbdevfs code as well -- to use ifnum_to_if() for mapping interface numbers to interfaces. It also won't hurt to add considerably more locking code (dev->serialize). Alan Stern ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel