mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bongani Hlope <bonganilinux@mweb.co.za>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Shutdown and Reboot Regression 2.6.25-rc[78]
Date: Mon, 14 Apr 2008 08:09:41 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.00.0804140808530.2820@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0804140759190.2820@woody.linux-foundation.org>



On Mon, 14 Apr 2008, Linus Torvalds wrote:
> 
> Since you cannot see this on -rc9, can you go back to -rc8 and test this 
> patch [...]

Oh, maybe I should actually include the patch too ;)

			Linus
---
 kernel/printk.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index c46a20a..4476879 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -643,8 +643,20 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
 {
 	int retval = 0;
 
-	if (can_use_console(cpu))
-		retval = !try_acquire_console_sem();
+	if (!try_acquire_console_sem()) {
+		retval = 1;
+
+		/*
+		 * If we can't use the console, we need to release
+		 * the console semaphore by hand to avoid flushing
+		 * the buffer
+		 */
+		if (!can_use_console(cpu)) {
+			console_locked = 0;
+			up(&console_sem);
+			retval = 0;
+		}
+	}
 	printk_cpu = UINT_MAX;
 	spin_unlock(&logbuf_lock);
 	return retval;

  reply	other threads:[~2008-04-14 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 20:41 Bongani Hlope
2008-04-11 20:58 ` Linus Torvalds
2008-04-11 21:42   ` Bongani Hlope
2008-04-11 23:12     ` Linus Torvalds
2008-04-12  7:04       ` Bongani Hlope
2008-04-11 21:42 ` Alexey Dobriyan
2008-04-12  7:05   ` Bongani Hlope
2008-04-14 15:08     ` Linus Torvalds
2008-04-14 15:09       ` Linus Torvalds [this message]
2008-04-15 19:50         ` Bongani Hlope

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=alpine.LFD.1.00.0804140808530.2820@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bonganilinux@mweb.co.za \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®