public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Fw: Re: OOPS when force unloading sctp with CONFIG_DEBUG_SLAB enabled
       [not found] <20040319160236.1271dd3c.akpm@osdl.org>
@ 2004-03-20 10:28 ` Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2004-03-20 10:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Sridhar Samudrala, lkml - Kernel Mailing List

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-20 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040319160236.1271dd3c.akpm@osdl.org>
2004-03-20 10:28 ` Fw: Re: OOPS when force unloading sctp with CONFIG_DEBUG_SLAB enabled Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox