diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-14 10:58:37 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-14 10:58:37 -0400 |
commit | 0fc11e3618bb1f9e0640127ec84f5d2690fa3894 (patch) | |
tree | 574050acc37269c5f7925cdd5d63a0714242102e | |
parent | 718dbf376ac39b8f8c974e9162430754dbace742 (diff) |
sh: unwinder: Convert frame allocations to GFP_ATOMIC.
save_stack_trace_tsk() and friends can be called from atomic context (as
triggered by latencytop), and subsequently hit two problematic allocation
points that were using GFP_KERNEL (these were dwarf_unwind_stack() and
dwarf_frame_alloc_regs()). Convert these over to GFP_ATOMIC and get
latencytop working with the DWARF unwinder.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/kernel/dwarf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 83f3cc92549f..db021361b161 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
@@ -57,7 +57,7 @@ static void dwarf_frame_alloc_regs(struct dwarf_frame *frame, | |||
57 | if (frame->num_regs >= num_regs) | 57 | if (frame->num_regs >= num_regs) |
58 | return; | 58 | return; |
59 | 59 | ||
60 | regs = kzalloc(new_size, GFP_KERNEL); | 60 | regs = kzalloc(new_size, GFP_ATOMIC); |
61 | if (!regs) { | 61 | if (!regs) { |
62 | printk(KERN_WARNING "Unable to allocate DWARF registers\n"); | 62 | printk(KERN_WARNING "Unable to allocate DWARF registers\n"); |
63 | /* | 63 | /* |
@@ -531,7 +531,7 @@ struct dwarf_frame *dwarf_unwind_stack(unsigned long pc, | |||
531 | define_ra = true; | 531 | define_ra = true; |
532 | } | 532 | } |
533 | 533 | ||
534 | frame = kzalloc(sizeof(*frame), GFP_KERNEL); | 534 | frame = kzalloc(sizeof(*frame), GFP_ATOMIC); |
535 | if (!frame) | 535 | if (!frame) |
536 | return NULL; | 536 | return NULL; |
537 | 537 | ||