From: Rusty Russell <rusty@au1.ibm.com>
Vatsa spotted this: you can remove a module while it's being initialized,
and that will be bad. Hole was opened when I dropped the sem around the
init routine (which can probe for other modules).
goto out;
}
- /* Already dying? */
- if (mod->state == MODULE_STATE_GOING) {
+ /* Doing init or already dying? */
+ if (mod->state != MODULE_STATE_LIVE) {
/* FIXME: if (force), slam module count and wake up
waiter --RR */
DEBUGP("%s already dying\n", mod->name);