Commit 52db2a96 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] module removal race fix

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).
parent faab2e12
......@@ -687,8 +687,8 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment