ia64/xen-unstable
changeset 18365:5bb2700e773a
[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@valinux.co.jp>
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@valinux.co.jp>
author | Isaku Yamahata <yamahata@valinux.co.jp> |
---|---|
date | Mon Aug 25 19:04:37 2008 +0900 (2008-08-25) |
parents | 5a61dba2cf0a |
children | efee1e0f2e08 |
files | xen/arch/ia64/linux-xen/unwind.c |
line diff
1.1 --- a/xen/arch/ia64/linux-xen/unwind.c Mon Aug 25 19:04:37 2008 +0900 1.2 +++ b/xen/arch/ia64/linux-xen/unwind.c Mon Aug 25 19:04:37 2008 +0900 1.3 @@ -91,9 +91,9 @@ 1.4 #endif 1.5 1.6 #ifdef XEN 1.7 -#define alloc_reg_state() xmalloc(struct unw_reg_state) 1.8 +#define alloc_reg_state() ({in_irq()? NULL: xmalloc(struct unw_reg_state);}) 1.9 #define free_reg_state(usr) xfree(usr) 1.10 -#define alloc_labeled_state() xmalloc(struct unw_labeled_state) 1.11 +#define alloc_labeled_state() ({in_irq()? NULL: xmalloc(struct unw_labeled_state);}) 1.12 #define free_labeled_state(usr) xfree(usr) 1.13 #else 1.14 #define alloc_reg_state() kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC)