public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Paolo Ciarrocchi <ciarrocchi@linuxmail.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] Re: 2.5.3[3,4] Preemption problem
Date: 10 Sep 2002 15:44:38 -0400	[thread overview]
Message-ID: <1031687078.1571.14.camel@phantasy> (raw)
In-Reply-To: <20020909213137.28292.qmail@linuxmail.org>

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;
 


  parent reply	other threads:[~2002-09-10 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09 21:31 2.5.3[3,4] Preemption problem Paolo Ciarrocchi
2002-09-09 21:52 ` Robert Love
2002-09-10 19:44 ` Robert Love [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-09-10 21:54 [patch] " Paolo Ciarrocchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1031687078.1571.14.camel@phantasy \
    --to=rml@tech9.net \
    --cc=ciarrocchi@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox