diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-18 21:29:16 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 00:07:40 +0100 |
commit | 5c49574ffd7ac07eae8c3b065d19e6ebc7e4760f (patch) | |
tree | 10c25476b152eca9917eea82fbecff28718eb2fc /kernel/signal.c | |
parent | unify SS_ONSTACK/SS_DISABLE definitions (diff) | |
download | linux-5c49574ffd7ac07eae8c3b065d19e6ebc7e4760f.tar.xz linux-5c49574ffd7ac07eae8c3b065d19e6ebc7e4760f.zip |
new helper: restore_altstack()
to be used by rt_sigreturn instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 7 insertions, 0 deletions
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: 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 /** |