Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3353
b: refs/heads/master
c: 4f339ec
h: refs/heads/master
i:
  3351: 402ddda
v: v3
  • Loading branch information
Alexander Nyberg authored and Linus Torvalds committed Jun 25, 2005
1 parent 00263b2 commit 4889ffe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e274d144302068a00794ec22e73520c0615cb6f
refs/heads/master: 4f339ecb30c759f94a29992d4635d9194132b6cf
12 changes: 8 additions & 4 deletions trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ static inline void die_if_kernel(const char * str, struct pt_regs * regs, long e
static void do_trap(int trapnr, int signr, char *str, int vm86,
struct pt_regs * regs, long error_code, siginfo_t *info)
{
struct task_struct *tsk = current;
tsk->thread.error_code = error_code;
tsk->thread.trap_no = trapnr;

if (regs->eflags & VM_MASK) {
if (vm86)
goto vm86_trap;
Expand All @@ -379,9 +383,6 @@ static void do_trap(int trapnr, int signr, char *str, int vm86,
goto kernel_trap;

trap_signal: {
struct task_struct *tsk = current;
tsk->thread.error_code = error_code;
tsk->thread.trap_no = trapnr;
if (info)
force_sig_info(signr, info, tsk);
else
Expand Down Expand Up @@ -494,6 +495,9 @@ fastcall void do_general_protection(struct pt_regs * regs, long error_code)
}
put_cpu();

current->thread.error_code = error_code;
current->thread.trap_no = 13;

if (regs->eflags & VM_MASK)
goto gp_in_vm86;

Expand Down Expand Up @@ -897,9 +901,9 @@ fastcall void do_simd_coprocessor_error(struct pt_regs * regs,
error_code);
return;
}
die_if_kernel("cache flush denied", regs, error_code);
current->thread.trap_no = 19;
current->thread.error_code = error_code;
die_if_kernel("cache flush denied", regs, error_code);
force_sig(SIGSEGV, current);
}
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/i386/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code)
printk(KERN_ALERT "*pte = %08lx\n", page);
}
#endif
tsk->thread.cr2 = address;
tsk->thread.trap_no = 14;
tsk->thread.error_code = error_code;
die("Oops", regs, error_code);
bust_spinlocks(0);
do_exit(SIGKILL);
Expand Down

0 comments on commit 4889ffe

Please sign in to comment.