2003-08-14 19:38:30

by Micha

[permalink] [raw]
Subject: modprobe usbcore from acpid problem 2.4.21

There is a bug in the usbcore module, such that if it is loaded using
modprobe from an acpid script in response to an event it later fails to
unload again.

I isolated the problem to calling /etc/init.d/modutils (debian) from a
script that is called in responce to the sleep button event. This in
turn loads every module in /etc/modules using modprobe.
The modules loaded this way are (in this order):
hid
mousedev
uhci
When I later try to unload the usb modules, the usbcore module locks at:
drivers/usb/hub.c:void usb_hub_cleanup(void)
at the call to
wait_for_completion(&khubd_exited);

This doesn't happen if I call /etc/init.d/modutils manually from the
command line.

This is under kernel 2.4.21 (debian version) with acpi+swsusp patches.
Any ideas what would be different between this two methods that can
cause this bug ? I have ruled out the fact that acpid is run as a
daemon and might thus cause a problem with the reparent_to_init call
(ran it as a regular program, no help).

--
Micha Feigin
[email protected]