diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-25 01:36:15 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:32:49 -0500 |
commit | bde208d2e10b8e8cf01cadadf203f5abcf1e4fe2 (patch) | |
tree | c912569356a020402096e7a4e1919a578eca3b05 | |
parent | 1c37ea82775a160b1f03d27bda034260444caa2e (diff) |
switch mips to generic rt_sigsuspend(), make it unconditional
mips was the last architecture not using the generic variant.
Both native and compat variants switched to generic, which is
made unconditional now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 13 | ||||
-rw-r--r-- | arch/mips/kernel/signal32.c | 17 | ||||
-rw-r--r-- | arch/mips/kernel/signal_n32.c | 21 | ||||
-rw-r--r-- | kernel/signal.c | 2 |
6 files changed, 2 insertions, 55 deletions
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 7388e25984b2..ab34b32f1e34 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -232,7 +232,7 @@ EXPORT(sysn32_call_table) | |||
232 | PTR sys_32_rt_sigpending /* 6125 */ | 232 | PTR sys_32_rt_sigpending /* 6125 */ |
233 | PTR compat_sys_rt_sigtimedwait | 233 | PTR compat_sys_rt_sigtimedwait |
234 | PTR sys_32_rt_sigqueueinfo | 234 | PTR sys_32_rt_sigqueueinfo |
235 | PTR sysn32_rt_sigsuspend | 235 | PTR compat_sys_rt_sigsuspend |
236 | PTR compat_sys_sigaltstack | 236 | PTR compat_sys_sigaltstack |
237 | PTR compat_sys_utime /* 6130 */ | 237 | PTR compat_sys_utime /* 6130 */ |
238 | PTR sys_mknod | 238 | PTR sys_mknod |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 058a6c1e00a1..144d904cdb22 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -391,7 +391,7 @@ sys_call_table: | |||
391 | PTR sys_32_rt_sigpending | 391 | PTR sys_32_rt_sigpending |
392 | PTR compat_sys_rt_sigtimedwait | 392 | PTR compat_sys_rt_sigtimedwait |
393 | PTR sys_32_rt_sigqueueinfo | 393 | PTR sys_32_rt_sigqueueinfo |
394 | PTR sys32_rt_sigsuspend | 394 | PTR compat_sys_rt_sigsuspend |
395 | PTR sys_32_pread /* 4200 */ | 395 | PTR sys_32_pread /* 4200 */ |
396 | PTR sys_32_pwrite | 396 | PTR sys_32_pwrite |
397 | PTR sys_chown | 397 | PTR sys_chown |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index eab30865b2bd..f221722a6d43 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -259,19 +259,6 @@ asmlinkage int sys_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
259 | } | 259 | } |
260 | #endif | 260 | #endif |
261 | 261 | ||
262 | SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *,unewset, size_t, sigsetsize) | ||
263 | { | ||
264 | sigset_t newset; | ||
265 | |||
266 | /* XXX Don't preclude handling different sized sigset_t's. */ | ||
267 | if (sigsetsize != sizeof(sigset_t)) | ||
268 | return -EINVAL; | ||
269 | |||
270 | if (copy_from_user(&newset, unewset, sizeof(newset))) | ||
271 | return -EFAULT; | ||
272 | return sigsuspend(&newset); | ||
273 | } | ||
274 | |||
275 | #ifdef CONFIG_TRAD_SIGNALS | 262 | #ifdef CONFIG_TRAD_SIGNALS |
276 | SYSCALL_DEFINE3(sigaction, int, sig, const struct sigaction __user *, act, | 263 | SYSCALL_DEFINE3(sigaction, int, sig, const struct sigaction __user *, act, |
277 | struct sigaction __user *, oact) | 264 | struct sigaction __user *, oact) |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index bb3ec6f0863e..ff6146dddf5f 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -284,23 +284,6 @@ asmlinkage int sys32_sigsuspend(nabi_no_regargs struct pt_regs regs) | |||
284 | return sigsuspend(&newset); | 284 | return sigsuspend(&newset); |
285 | } | 285 | } |
286 | 286 | ||
287 | asmlinkage int sys32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | ||
288 | { | ||
289 | compat_sigset_t __user *uset; | ||
290 | sigset_t newset; | ||
291 | size_t sigsetsize; | ||
292 | |||
293 | /* XXX Don't preclude handling different sized sigset_t's. */ | ||
294 | sigsetsize = regs.regs[5]; | ||
295 | if (sigsetsize != sizeof(compat_sigset_t)) | ||
296 | return -EINVAL; | ||
297 | |||
298 | uset = (compat_sigset_t __user *) regs.regs[4]; | ||
299 | if (get_sigset(&newset, uset)) | ||
300 | return -EFAULT; | ||
301 | return sigsuspend(&newset); | ||
302 | } | ||
303 | |||
304 | SYSCALL_DEFINE3(32_sigaction, long, sig, const struct sigaction32 __user *, act, | 287 | SYSCALL_DEFINE3(32_sigaction, long, sig, const struct sigaction32 __user *, act, |
305 | struct sigaction32 __user *, oact) | 288 | struct sigaction32 __user *, oact) |
306 | { | 289 | { |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index e62e2bc63a81..5f4ef2ae6199 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -65,27 +65,6 @@ struct rt_sigframe_n32 { | |||
65 | struct ucontextn32 rs_uc; | 65 | struct ucontextn32 rs_uc; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat); | ||
69 | |||
70 | asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) | ||
71 | { | ||
72 | compat_sigset_t __user *unewset; | ||
73 | compat_sigset_t uset; | ||
74 | size_t sigsetsize; | ||
75 | sigset_t newset; | ||
76 | |||
77 | /* XXX Don't preclude handling different sized sigset_t's. */ | ||
78 | sigsetsize = regs.regs[5]; | ||
79 | if (sigsetsize != sizeof(sigset_t)) | ||
80 | return -EINVAL; | ||
81 | |||
82 | unewset = (compat_sigset_t __user *) regs.regs[4]; | ||
83 | if (copy_from_user(&uset, unewset, sizeof(uset))) | ||
84 | return -EFAULT; | ||
85 | sigset_from_compat(&newset, &uset); | ||
86 | return sigsuspend(&newset); | ||
87 | } | ||
88 | |||
89 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) | 68 | asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) |
90 | { | 69 | { |
91 | struct rt_sigframe_n32 __user *frame; | 70 | struct rt_sigframe_n32 __user *frame; |
diff --git a/kernel/signal.c b/kernel/signal.c index 775f5552fa0e..87c09e3061d2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -3562,7 +3562,6 @@ int sigsuspend(sigset_t *set) | |||
3562 | return -ERESTARTNOHAND; | 3562 | return -ERESTARTNOHAND; |
3563 | } | 3563 | } |
3564 | 3564 | ||
3565 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
3566 | /** | 3565 | /** |
3567 | * sys_rt_sigsuspend - replace the signal mask for a value with the | 3566 | * sys_rt_sigsuspend - replace the signal mask for a value with the |
3568 | * @unewset value until a signal is received | 3567 | * @unewset value until a signal is received |
@@ -3603,7 +3602,6 @@ COMPAT_SYSCALL_DEFINE2(rt_sigsuspend, compat_sigset_t __user *, unewset, compat_ | |||
3603 | #endif | 3602 | #endif |
3604 | } | 3603 | } |
3605 | #endif | 3604 | #endif |
3606 | #endif | ||
3607 | 3605 | ||
3608 | #ifdef CONFIG_OLD_SIGSUSPEND | 3606 | #ifdef CONFIG_OLD_SIGSUSPEND |
3609 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) | 3607 | SYSCALL_DEFINE1(sigsuspend, old_sigset_t, mask) |