2002-09-09 21:27:41

by Paolo Ciarrocchi

[permalink] [raw]
Subject: 2.5.3[3,4] Preemption problem

Hi all,

$ shutdown -h now

...
...
Halting system...
Shutting down devices
Power down.
note: halt[15347] exited with preempt_count 1

With 2.5.33 and 2.5.34.
Let me know is you need further information.

Ciao,
Paolo
--
Get your free email from http://www.linuxmail.org


Powered by Outblaze


2002-09-09 21:52:34

by Robert Love

[permalink] [raw]
Subject: Re: 2.5.3[3,4] Preemption problem

On Mon, 2002-09-09 at 17:31, Paolo Ciarrocchi wrote:

> Halting system...
> Shutting down devices
> Power down.
> note: halt[15347] exited with preempt_count 1

Note the "note" - this is just advisory and is not harmful. :)

Somewhere in the shutdown logic a lock (probably the BKL) is not
released (and why not, we are shutting down?). I'll see if I can find
it...

Robert Love


2002-09-10 19:39:55

by Robert Love

[permalink] [raw]
Subject: [patch] Re: 2.5.3[3,4] Preemption problem

On Mon, 2002-09-09 at 17:31, Paolo Ciarrocchi wrote:

> Halting system...
> Shutting down devices
> Power down.
> note: halt[15347] exited with preempt_count 1

I cooked up a patch... does this solve the problem (no more spurious
warning on reboot)?

Patch is against 2.5.34.

Robert Love

diff -urN linux-2.5.34/kernel/sys.c linux/kernel/sys.c
--- linux-2.5.34/kernel/sys.c Tue Sep 10 13:04:49 2002
+++ linux/kernel/sys.c Tue Sep 10 15:40:35 2002
@@ -316,7 +316,7 @@

/* For safety, we require "magic" arguments. */
if (magic1 != LINUX_REBOOT_MAGIC1 ||
- (magic2 != LINUX_REBOOT_MAGIC2 && magic2 != LINUX_REBOOT_MAGIC2A &&
+ (magic2 != LINUX_REBOOT_MAGIC2 && magic2 != LINUX_REBOOT_MAGIC2A &&
magic2 != LINUX_REBOOT_MAGIC2B))
return -EINVAL;

@@ -344,6 +344,7 @@
device_shutdown();
printk(KERN_EMERG "System halted.\n");
machine_halt();
+ unlock_kernel();
do_exit(0);
break;

@@ -353,6 +354,7 @@
device_shutdown();
printk(KERN_EMERG "Power down.\n");
machine_power_off();
+ unlock_kernel();
do_exit(0);
break;


2002-09-10 21:51:50

by Paolo Ciarrocchi

[permalink] [raw]
Subject: Re: [patch] Re: 2.5.3[3,4] Preemption problem

From: Robert Love <[email protected]>
> On Mon, 2002-09-09 at 17:31, Paolo Ciarrocchi wrote:
>
> > Halting system...
> > Shutting down devices
> > Power down.
> > note: halt[15347] exited with preempt_count 1
>
> I cooked up a patch... does this solve the problem (no more spurious
> warning on reboot)?
Yes it does.
Thank you.

Ciao,
Paolo
--
Get your free email from http://www.linuxmail.org


Powered by Outblaze