diff options
author | Richard Weinberger <richard@nod.at> | 2012-05-21 17:25:37 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-05-21 17:25:37 -0400 |
commit | 2ccf62b36097aa88e0ea152d6ef0c0ca2d3884e6 (patch) | |
tree | bc93e28e0e72fa0cc8c20f64f9e1f3657ad5e479 /arch/um/kernel | |
parent | 875682648b89a3ebc06176d60dc280f810647839 (diff) | |
parent | ffc51be82b17e1c515fdb2dd5b92605798216b30 (diff) |
Merge branch 'for-um' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal into for-3.5
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/process.c | 10 | ||||
-rw-r--r-- | arch/um/kernel/signal.c | 14 | ||||
-rw-r--r-- | arch/um/kernel/skas/syscall.c | 2 |
3 files changed, 14 insertions, 12 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 2b73dedb44ca..3a2235e0abc3 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
21 | #include <linux/tracehook.h> | ||
21 | #include <asm/current.h> | 22 | #include <asm/current.h> |
22 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
23 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
@@ -114,8 +115,13 @@ void interrupt_end(void) | |||
114 | { | 115 | { |
115 | if (need_resched()) | 116 | if (need_resched()) |
116 | schedule(); | 117 | schedule(); |
117 | if (test_tsk_thread_flag(current, TIF_SIGPENDING)) | 118 | if (test_thread_flag(TIF_SIGPENDING)) |
118 | do_signal(); | 119 | do_signal(); |
120 | if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { | ||
121 | tracehook_notify_resume(¤t->thread.regs); | ||
122 | if (current->replacement_session_keyring) | ||
123 | key_replace_session_keyring(); | ||
124 | } | ||
119 | } | 125 | } |
120 | 126 | ||
121 | void exit_thread(void) | 127 | void exit_thread(void) |
@@ -190,7 +196,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
190 | if (current->thread.forking) { | 196 | if (current->thread.forking) { |
191 | memcpy(&p->thread.regs.regs, ®s->regs, | 197 | memcpy(&p->thread.regs.regs, ®s->regs, |
192 | sizeof(p->thread.regs.regs)); | 198 | sizeof(p->thread.regs.regs)); |
193 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.gp, 0); | 199 | UPT_SET_SYSCALL_RETURN(&p->thread.regs.regs, 0); |
194 | if (sp != 0) | 200 | if (sp != 0) |
195 | REGS_SP(p->thread.regs.regs.gp) = sp; | 201 | REGS_SP(p->thread.regs.regs.gp) = sp; |
196 | 202 | ||
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index fb12f4c5e649..187118fbe1bc 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -29,9 +29,6 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, | |||
29 | unsigned long sp; | 29 | unsigned long sp; |
30 | int err; | 30 | int err; |
31 | 31 | ||
32 | /* Always make any pending restarted system calls return -EINTR */ | ||
33 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | ||
34 | |||
35 | /* Did we come from a system call? */ | 32 | /* Did we come from a system call? */ |
36 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { | 33 | if (PT_REGS_SYSCALL_NR(regs) >= 0) { |
37 | /* If so, check system call restarting.. */ | 34 | /* If so, check system call restarting.. */ |
@@ -77,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs) | |||
77 | { | 74 | { |
78 | struct k_sigaction ka_copy; | 75 | struct k_sigaction ka_copy; |
79 | siginfo_t info; | 76 | siginfo_t info; |
80 | sigset_t *oldset; | ||
81 | int sig, handled_sig = 0; | 77 | int sig, handled_sig = 0; |
82 | 78 | ||
83 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
84 | oldset = ¤t->saved_sigmask; | ||
85 | else | ||
86 | oldset = ¤t->blocked; | ||
87 | |||
88 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { | 79 | while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { |
80 | sigset_t *oldset; | ||
81 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
82 | oldset = ¤t->saved_sigmask; | ||
83 | else | ||
84 | oldset = ¤t->blocked; | ||
89 | handled_sig = 1; | 85 | handled_sig = 1; |
90 | /* Whee! Actually deliver the signal. */ | 86 | /* Whee! Actually deliver the signal. */ |
91 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { | 87 | if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) { |
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index f5173e1ec3ac..05fbeb480e0b 100644 --- a/arch/um/kernel/skas/syscall.c +++ b/arch/um/kernel/skas/syscall.c | |||
@@ -34,7 +34,7 @@ void handle_syscall(struct uml_pt_regs *r) | |||
34 | result = -ENOSYS; | 34 | result = -ENOSYS; |
35 | else result = EXECUTE_SYSCALL(syscall, regs); | 35 | else result = EXECUTE_SYSCALL(syscall, regs); |
36 | 36 | ||
37 | REGS_SET_SYSCALL_RETURN(r->gp, result); | 37 | UPT_SET_SYSCALL_RETURN(r, result); |
38 | 38 | ||
39 | syscall_trace(r, 1); | 39 | syscall_trace(r, 1); |
40 | } | 40 | } |