diff options
Diffstat (limited to 'arch/um/os-Linux/skas/trap.c')
-rw-r--r-- | arch/um/os-Linux/skas/trap.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/um/os-Linux/skas/trap.c b/arch/um/os-Linux/skas/trap.c index f104427d2caf..6a20d08caf91 100644 --- a/arch/um/os-Linux/skas/trap.c +++ b/arch/um/os-Linux/skas/trap.c | |||
@@ -18,10 +18,9 @@ | |||
18 | void sig_handler_common_skas(int sig, void *sc_ptr) | 18 | void sig_handler_common_skas(int sig, void *sc_ptr) |
19 | { | 19 | { |
20 | struct sigcontext *sc = sc_ptr; | 20 | struct sigcontext *sc = sc_ptr; |
21 | struct skas_regs *r; | 21 | union uml_pt_regs *r; |
22 | void (*handler)(int, union uml_pt_regs *); | 22 | void (*handler)(int, union uml_pt_regs *); |
23 | int save_errno = errno; | 23 | int save_user, save_errno = errno; |
24 | int save_user; | ||
25 | 24 | ||
26 | /* This is done because to allow SIGSEGV to be delivered inside a SEGV | 25 | /* This is done because to allow SIGSEGV to be delivered inside a SEGV |
27 | * handler. This can happen in copy_user, and if SEGV is disabled, | 26 | * handler. This can happen in copy_user, and if SEGV is disabled, |
@@ -31,13 +30,13 @@ void sig_handler_common_skas(int sig, void *sc_ptr) | |||
31 | if(sig == SIGSEGV) | 30 | if(sig == SIGSEGV) |
32 | change_sig(SIGSEGV, 1); | 31 | change_sig(SIGSEGV, 1); |
33 | 32 | ||
34 | r = &TASK_REGS(get_current())->skas; | 33 | r = TASK_REGS(get_current()); |
35 | save_user = r->is_user; | 34 | save_user = r->skas.is_user; |
36 | r->is_user = 0; | 35 | r->skas.is_user = 0; |
37 | if ( sig == SIGFPE || sig == SIGSEGV || | 36 | if ( sig == SIGFPE || sig == SIGSEGV || |
38 | sig == SIGBUS || sig == SIGILL || | 37 | sig == SIGBUS || sig == SIGILL || |
39 | sig == SIGTRAP ) { | 38 | sig == SIGTRAP ) { |
40 | GET_FAULTINFO_FROM_SC(r->faultinfo, sc); | 39 | GET_FAULTINFO_FROM_SC(r->skas.faultinfo, sc); |
41 | } | 40 | } |
42 | 41 | ||
43 | change_sig(SIGUSR1, 1); | 42 | change_sig(SIGUSR1, 1); |
@@ -49,10 +48,10 @@ void sig_handler_common_skas(int sig, void *sc_ptr) | |||
49 | sig != SIGVTALRM && sig != SIGALRM) | 48 | sig != SIGVTALRM && sig != SIGALRM) |
50 | unblock_signals(); | 49 | unblock_signals(); |
51 | 50 | ||
52 | handler(sig, (union uml_pt_regs *) r); | 51 | handler(sig, r); |
53 | 52 | ||
54 | errno = save_errno; | 53 | errno = save_errno; |
55 | r->is_user = save_user; | 54 | r->skas.is_user = save_user; |
56 | } | 55 | } |
57 | 56 | ||
58 | extern int ptrace_faultinfo; | 57 | extern int ptrace_faultinfo; |