Skip to content

Commit

Permalink
MIPS: Fix Magic SysRq L kernel crash.
Browse files Browse the repository at this point in the history
show_backtrace() was passed a NULL pointer which caused paging
request fail. Set to current task as other architectures (ARM,
etc) do when passed a NULL task pointer.

Signed-off-by: Vincent Wen <vincentwenlinux@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Patchwork: https://patchwork.linux-mips.org/patch/3524/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Vincent Wen authored and Ralf Baechle committed Jul 19, 2012
1 parent ca760ca commit e909be8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ static void show_backtrace(struct task_struct *task, const struct pt_regs *regs)
unsigned long ra = regs->regs[31];
unsigned long pc = regs->cp0_epc;

if (!task)
task = current;

if (raw_show_trace || !__kernel_text_address(pc)) {
show_raw_backtrace(sp);
return;
Expand Down

0 comments on commit e909be8

Please sign in to comment.