projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
468f659
)
um: segv: Save regs only in case of a kernel mode fault
author
Richard Weinberger
<richard@nod.at>
Sun, 20 Jul 2014 11:39:27 +0000
(13:39 +0200)
committer
Richard Weinberger
<richard@nod.at>
Sun, 20 Jul 2014 11:39:27 +0000
(13:39 +0200)
...otherwise me lose user mode regs and the resulting
stack trace is useless.
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/trap.c
patch
|
blob
|
history
diff --git
a/arch/um/kernel/trap.c
b/arch/um/kernel/trap.c
index 974b87474a9900f1909f845d449eba90dc9b8338..5678c3571e7cb4d1572d0b16a91b0650f76095c7 100644
(file)
--- a/
arch/um/kernel/trap.c
+++ b/
arch/um/kernel/trap.c
@@
-206,7
+206,7
@@
unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user,
int is_write = FAULT_WRITE(fi);
unsigned long address = FAULT_ADDRESS(fi);
- if (regs)
+ if (
!is_user &&
regs)
current->thread.segv_regs = container_of(regs, struct pt_regs, regs);
if (!is_user && (address >= start_vm) && (address < end_vm)) {