cris: switch to generic old sigaction()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 26 Dec 2012 00:30:53 +0000 (19:30 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 3 Feb 2013 23:15:53 +0000 (18:15 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/cris/Kconfig
arch/cris/arch-v10/kernel/signal.c
arch/cris/arch-v32/kernel/signal.c
arch/cris/include/asm/signal.h

index 686968c10897441c6c7d1e253a511b398732de12..c2a1d0a8924c6135d93b52458996b8e5d0d3b89c 100644 (file)
@@ -52,6 +52,7 @@ config CRIS
        select CLONE_BACKWARDS2
        select GENERIC_SIGALTSTACK
        select OLD_SIGSUSPEND
+       select OLD_SIGACTION
 
 config HZ
        int
index e53c1b455c356d810ee697a95c7a9ab075a58873..090e9c64408b40d1e10cff1cd60136533c5e687d 100644 (file)
 
 void do_signal(int canrestart, struct pt_regs *regs);
 
-int sys_sigaction(int sig, const struct old_sigaction __user *act,
-       struct old_sigaction *oact)
-{
-       struct k_sigaction new_ka, old_ka;
-       int ret;
-
-       if (act) {
-               old_sigset_t mask;
-               if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
-                   __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
-                   __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) ||
-                    __get_user(new_ka.sa.sa_flags, &act->sa_flags) ||
-                    __get_user(mask, &act->sa_mask))
-                       return -EFAULT;
-               siginitset(&new_ka.sa.sa_mask, mask);
-       }
-
-       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
-
-       if (!ret && oact) {
-               if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) ||
-                   __put_user(old_ka.sa.sa_flags, &oact->sa_flags) ||
-                   __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask))
-                       return -EFAULT;
-       }
-
-       return ret;
-}
-
 /*
  * Do a signal return; undo the signal stack.
  */
index 4ccf144b49a9bbbefd6b881eeb402bb862c35209..cee740732d1f540be1ee664d84b348873f07ee14 100644 (file)
@@ -52,42 +52,6 @@ void do_signal(int restart, struct pt_regs *regs);
 void keep_debug_flags(unsigned long oldccs, unsigned long oldspc,
                      struct pt_regs *regs);
 
-int
-sys_sigaction(int signal, const struct old_sigaction *act,
-             struct old_sigaction *oact)
-{
-       int retval;
-       struct k_sigaction newk;
-       struct k_sigaction oldk;
-
-       if (act) {
-               old_sigset_t mask;
-
-               if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
-                   __get_user(newk.sa.sa_handler, &act->sa_handler) ||
-                   __get_user(newk.sa.sa_restorer, &act->sa_restorer) ||
-                   __get_user(newk.sa.sa_flags, &act->sa_flags) ||
-                   __get_user(mask, &act->sa_mask))
-                       return -EFAULT;
-
-               siginitset(&newk.sa.sa_mask, mask);
-       }
-
-       retval = do_sigaction(signal, act ? &newk : NULL, oact ? &oldk : NULL);
-
-       if (!retval && oact) {
-               if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user(oldk.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user(oldk.sa.sa_restorer, &oact->sa_restorer) ||
-                   __put_user(oldk.sa.sa_flags, &oact->sa_flags) ||
-                   __put_user(oldk.sa.sa_mask.sig[0], &oact->sa_mask))
-                       return -EFAULT;
-
-       }
-
-       return retval;
-}
-
 static int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
 {
index b3650ab2c320c9a876c2f801470e2ad20d28f9bf..c11b8745cecee2b6899fb8b07ef3c24a1434e8ef 100644 (file)
@@ -16,13 +16,6 @@ typedef struct {
        unsigned long sig[_NSIG_WORDS];
 } sigset_t;
 
-struct old_sigaction {
-       __sighandler_t sa_handler;
-       old_sigset_t sa_mask;
-       unsigned long sa_flags;
-       void (*sa_restorer)(void);
-};
-
 #define __ARCH_HAS_SA_RESTORER
 
 #include <asm/sigcontext.h>