aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-08-16 16:58:31 -0400
committerJason Wessel <jason.wessel@windriver.com>2010-08-16 16:58:31 -0400
commitbeed5336eba6a5a70c97e9f4bfff525915a25003 (patch)
treecbc477bf6c3377da41c50a6d80c7218a4a589b6c
parentfed891c89bfd8ef898c2289b34e748969bb12798 (diff)
vt,console,kdb: preserve console_blanked while in kdb
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>
-rw-r--r--drivers/char/vt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 3af1a2229fec..50590c7f2c01 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -198,6 +198,7 @@ static int saved_fg_console;
198static int saved_last_console; 198static int saved_last_console;
199static int saved_want_console; 199static int saved_want_console;
200static int saved_vc_mode; 200static int saved_vc_mode;
201static int saved_console_blanked;
201 202
202/* 203/*
203 * For each existing display, we have a pointer to console currently visible 204 * For each existing display, we have a pointer to console currently visible
@@ -3449,6 +3450,7 @@ int con_debug_enter(struct vc_data *vc)
3449 saved_last_console = last_console; 3450 saved_last_console = last_console;
3450 saved_want_console = want_console; 3451 saved_want_console = want_console;
3451 saved_vc_mode = vc->vc_mode; 3452 saved_vc_mode = vc->vc_mode;
3453 saved_console_blanked = console_blanked;
3452 vc->vc_mode = KD_TEXT; 3454 vc->vc_mode = KD_TEXT;
3453 console_blanked = 0; 3455 console_blanked = 0;
3454 if (vc->vc_sw->con_debug_enter) 3456 if (vc->vc_sw->con_debug_enter)
@@ -3492,6 +3494,7 @@ int con_debug_leave(void)
3492 fg_console = saved_fg_console; 3494 fg_console = saved_fg_console;
3493 last_console = saved_last_console; 3495 last_console = saved_last_console;
3494 want_console = saved_want_console; 3496 want_console = saved_want_console;
3497 console_blanked = saved_console_blanked;
3495 vc_cons[fg_console].d->vc_mode = saved_vc_mode; 3498 vc_cons[fg_console].d->vc_mode = saved_vc_mode;
3496 3499
3497 vc = vc_cons[fg_console].d; 3500 vc = vc_cons[fg_console].d;