summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-11-18 15:29:16 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-19 18:07:40 -0500
commit5c49574ffd7ac07eae8c3b065d19e6ebc7e4760f (patch)
tree10c25476b152eca9917eea82fbecff28718eb2fc
parent031b6566983ad9c0247087f039af22b3f87596a3 (diff)
new helper: restore_altstack()
to be used by rt_sigreturn instances Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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 e19a011b43b7..5969522136fe 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -385,4 +385,6 @@ int unhandled_signal(struct task_struct *tsk, int sig);
385 385
386void signals_init(void); 386void signals_init(void);
387 387
388int restore_altstack(const stack_t __user *);
389
388#endif /* _LINUX_SIGNAL_H */ 390#endif /* _LINUX_SIGNAL_H */
diff --git a/kernel/signal.c b/kernel/signal.c
index e75e4bd2839b..887f2fefe207 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3103,6 +3103,13 @@ out:
3103 return error; 3103 return error;
3104} 3104}
3105 3105
3106int restore_altstack(const stack_t __user *uss)
3107{
3108 int err = do_sigaltstack(uss, NULL, current_user_stack_pointer());
3109 /* squash all but EFAULT for now */
3110 return err == -EFAULT ? err : 0;
3111}
3112
3106#ifdef __ARCH_WANT_SYS_SIGPENDING 3113#ifdef __ARCH_WANT_SYS_SIGPENDING
3107 3114
3108/** 3115/**