diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-24 06:30:16 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-22 03:59:48 (GMT) |
commit | a53bb24e7666870bbc195e295a936aa0a58ce313 (patch) | |
tree | a6262e348507e0b391993649c70e21e72e1a2cb7 /arch/xtensa/kernel/signal.c | |
parent | 8314019141e4f7274ea4dc264a47bbb2e17c66dd (diff) | |
download | linux-a53bb24e7666870bbc195e295a936aa0a58ce313.tar.xz |
xtensa: add handling of TIF_NOTIFY_RESUME
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/xtensa/kernel/signal.c')
-rw-r--r-- | arch/xtensa/kernel/signal.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index bb00cc4..c5e4ec0 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c @@ -20,6 +20,7 @@ #include <linux/ptrace.h> #include <linux/personality.h> #include <linux/freezer.h> +#include <linux/tracehook.h> #include <asm/ucontext.h> #include <asm/uaccess.h> @@ -446,16 +447,13 @@ asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, * the kernel can handle, and then we build all the user-level signal handling * stack-frames in one go after that. */ -void do_signal(struct pt_regs *regs) +static void do_signal(struct pt_regs *regs) { siginfo_t info; int signr; struct k_sigaction ka; sigset_t oldset; - if (!user_mode(regs)) - return; - if (try_to_freeze()) goto no_signal; @@ -542,3 +540,17 @@ no_signal: return; } +void do_notify_resume(struct pt_regs *regs) +{ + if (!user_mode(regs)) + return; + + if (test_thread_flag(TIF_SIGPENDING)) + do_signal(regs); + + if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { + tracehook_notify_resume(regs); + if (current->replacement_session_keyring) + key_replace_session_keyring(); + } +} |