mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: torvalds@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	Jason Wessel <jason.wessel@windriver.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 5/5] vt,console,kdb: preserve console_blanked while in kdb
Date: Mon, 16 Aug 2010 16:06:29 -0500	[thread overview]
Message-ID: <1281992789-2471-6-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1281992789-2471-5-git-send-email-jason.wessel@windriver.com>

Commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb:
implement atomic console enter/leave functions) introduced the ability
to atomically change the console mode with kernel mode setting but did
not preserve the state of the console_blanked variable.

The console_blanked variable must be restored when executing the
con_debug_leave() or further kernel mode set changes (such as using
chvt X) will fail to correctly set the state of console.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Andrew Morton <akpm@linux-foundation.org>
---
 drivers/char/vt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 3af1a22..50590c7 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -198,6 +198,7 @@ static int saved_fg_console;
 static int saved_last_console;
 static int saved_want_console;
 static int saved_vc_mode;
+static int saved_console_blanked;
 
 /*
  * For each existing display, we have a pointer to console currently visible
@@ -3449,6 +3450,7 @@ int con_debug_enter(struct vc_data *vc)
 	saved_last_console = last_console;
 	saved_want_console = want_console;
 	saved_vc_mode = vc->vc_mode;
+	saved_console_blanked = console_blanked;
 	vc->vc_mode = KD_TEXT;
 	console_blanked = 0;
 	if (vc->vc_sw->con_debug_enter)
@@ -3492,6 +3494,7 @@ int con_debug_leave(void)
 	fg_console = saved_fg_console;
 	last_console = saved_last_console;
 	want_console = saved_want_console;
+	console_blanked = saved_console_blanked;
 	vc_cons[fg_console].d->vc_mode = saved_vc_mode;
 
 	vc = vc_cons[fg_console].d;
-- 
1.6.3.3


      reply	other threads:[~2010-08-16 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 21:06 [GIT PULL] kgdb/kdb fixes for 2.6.36-rc1 Jason Wessel
2010-08-16 21:06 ` [PATCH 1/5] kdb: fix compile error without CONFIG_KALLSYMS Jason Wessel
2010-08-16 21:06   ` [PATCH 2/5] kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c Jason Wessel
2010-08-16 21:06     ` [PATCH 3/5] arm,kgdb: fix GDB_MAX_REGS no longer used Jason Wessel
2010-08-16 21:06       ` [PATCH 4/5] vt: fix regression warnings from KMS merge Jason Wessel
2010-08-16 21:06         ` Jason Wessel [this message]

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=1281992789-2471-6-git-send-email-jason.wessel@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=akpm@linux-foundation.org \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®