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-ia64-devel

[Xen-ia64-devel] [PATCH] fix stack unwinder.

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] fix stack unwinder.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 20 Aug 2008 15:39:07 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Tue, 19 Aug 2008 23:36:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
[IA64] fix stack unwinder.

The stack unwinder can be called in interrupt context. On the other
hand xmalloc() can't be called in interrupt context.
Don't call xmalloc() if in the interrupt context.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 63107bf2c6e4 xen/arch/ia64/linux-xen/unwind.c
--- a/xen/arch/ia64/linux-xen/unwind.c  Thu Aug 07 18:27:44 2008 +0900
+++ b/xen/arch/ia64/linux-xen/unwind.c  Thu Aug 07 18:29:31 2008 +0900
@@ -91,9 +91,9 @@
 #endif
 
 #ifdef XEN
-#define alloc_reg_state()      xmalloc(struct unw_reg_state)
+#define alloc_reg_state()      ({in_irq()? NULL: xmalloc(struct 
unw_reg_state);})
 #define free_reg_state(usr)    xfree(usr)
-#define alloc_labeled_state()  xmalloc(struct unw_labeled_state)
+#define alloc_labeled_state()  ({in_irq()? NULL: xmalloc(struct 
unw_labeled_state);})
 #define free_labeled_state(usr)        xfree(usr)
 #else
 #define alloc_reg_state()      kmalloc(sizeof(struct unw_reg_state), 
GFP_ATOMIC)

Attachment: avoid-bug-in-unwinder.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] fix stack unwinder., Isaku Yamahata <=