[PATCH] uml: Fix sysrq-r support for skas mode
The old code had the IP and SP coming from the registers in the thread struct, which are completely wrong since those are the userspace registers. This fixes that by pulling the correct values from the jmp_buf in which the kernel state of each thread is stored. Signed-off-by: Allan Graves <allan.graves@oracle.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
71dc036247
commit
fad1c45c93
@@ -62,13 +62,7 @@ void show_stack(struct task_struct *task, unsigned long *esp)
|
||||
|
||||
if (esp == NULL) {
|
||||
if (task != current && task != NULL) {
|
||||
/* XXX: Isn't this bogus? I.e. isn't this the
|
||||
* *userspace* stack of this task? If not so, use this
|
||||
* even when task == current (as in i386).
|
||||
*/
|
||||
esp = (unsigned long *) KSTK_ESP(task);
|
||||
/* Which one? No actual difference - just coding style.*/
|
||||
//esp = (unsigned long *) PT_REGS_IP(&task->thread.regs);
|
||||
} else {
|
||||
esp = (unsigned long *) &esp;
|
||||
}
|
||||
@@ -84,5 +78,5 @@ void show_stack(struct task_struct *task, unsigned long *esp)
|
||||
}
|
||||
|
||||
printk("Call Trace: \n");
|
||||
show_trace(current, esp);
|
||||
show_trace(task, esp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user