WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Avoid deadlock in tasklet_schedule() afte

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Avoid deadlock in tasklet_schedule() after console_force_unlock().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Mar 2009 04:30:20 -0700
Delivery-date: Mon, 09 Mar 2009 04:31:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236592576 0
# Node ID f57ac4af36b431b10645ee145270ee658f46d58d
# Parent  5997e86988f6800eed360d6858a419eede556d6b
Avoid deadlock in tasklet_schedule() after console_force_unlock().

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/drivers/char/console.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff -r 5997e86988f6 -r f57ac4af36b4 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Mon Mar 09 09:49:50 2009 +0000
+++ b/xen/drivers/char/console.c        Mon Mar 09 09:56:16 2009 +0000
@@ -420,6 +420,8 @@ long do_console_io(int cmd, int count, X
  * *****************************************************
  */
 
+static bool_t console_locks_busted;
+
 static void __putstr(const char *str)
 {
     int c;
@@ -429,10 +431,12 @@ static void __putstr(const char *str)
     sercon_puts(str);
     vga_puts(str);
 
-    while ( (c = *str++) != '\0' )
-        putchar_console_ring(c);
-
-    tasklet_schedule(&notify_dom0_con_ring_tasklet);
+    if ( !console_locks_busted )
+    {
+        while ( (c = *str++) != '\0' )
+            putchar_console_ring(c);
+        tasklet_schedule(&notify_dom0_con_ring_tasklet);
+    }
 }
 
 static int printk_prefix_check(char *p, char **pp)
@@ -665,6 +669,7 @@ void console_force_unlock(void)
 {
     spin_lock_init(&console_lock);
     serial_force_unlock(sercon_handle);
+    console_locks_busted = 1;
     console_start_sync();
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Avoid deadlock in tasklet_schedule() after console_force_unlock()., Xen patchbot-unstable <=