aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/signal.h2
-rw-r--r--kernel/signal.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/signal.h b/include/linux/signal.h
index e19a011b43b..5969522136f 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -385,4 +385,6 @@ int unhandled_signal(struct task_struct *tsk, int sig);
void signals_init(void);
+int restore_altstack(const stack_t __user *);
+
#endif /* _LINUX_SIGNAL_H */
diff --git a/kernel/signal.c b/kernel/signal.c
index e75e4bd2839..887f2fefe20 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3103,6 +3103,13 @@ out:
return error;
}
+int restore_altstack(const stack_t __user *uss)
+{
+ int err = do_sigaltstack(uss, NULL, current_user_stack_pointer());
+ /* squash all but EFAULT for now */
+ return err == -EFAULT ? err : 0;
+}
+
#ifdef __ARCH_WANT_SYS_SIGPENDING
/**