Messages in this thread Patch in this message | | | Subject | Re: Fw: Re: OOPS when force unloading sctp with CONFIG_DEBUG_SLAB enabled | From | Rusty Russell <> | Date | Sat, 20 Mar 2004 21:28:40 +1100 |
| |
On Sat, 2004-03-20 at 11:02, Andrew Morton wrote: > Some advice on this please?
This patch just went to Linus. Summary, there is a problem, their patch makes it worse, but original problem only happens with rmmod --wait.
BTW, "forced unloading of xxx causes yyy" reports pretty much have to be ignored.
Cheers, Rusty. >From rusty@rustcorp.com.au From: rusty@rustcorp.com.au To: torvalds@osdl.org Subject: [PATCH 1] Set mod->waiter Before Calling stop_machine
Name: Set mod->waiter Before Calling stop_machine Status: Tested on 2.6.5-rc1-bk4
mod->waiter needs to be set before we try to stop the module: setting it in __try_stop_module means it gets set to the kthread, not rmmod.
Spotted by someone else, but I can't find the mail... 8(
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .30682-linux-2.6.5-rc1-bk4/kernel/module.c .30682-linux-2.6.5-rc1-bk4.updated/kernel/module.c --- .30682-linux-2.6.5-rc1-bk4/kernel/module.c 2004-03-20 09:46:01.000000000 +1100 +++ .30682-linux-2.6.5-rc1-bk4.updated/kernel/module.c 2004-03-20 10:06:26.000000000 +1100 @@ -493,7 +493,6 @@ static inline int __try_stop_module(void } /* Mark it as dying. */ - sref->mod->waiter = current; sref->mod->state = MODULE_STATE_GOING; return 0; } @@ -588,6 +587,9 @@ sys_delete_module(const char __user *nam } } + /* Set this up before setting mod->state */ + mod->waiter = current; + /* Stop the machine so refcounts can't move and disable module. */ ret = try_stop_module(mod, flags, &forced);
-- Anyone who quotes me in their signature is an idiot -- Rusty Russell
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |