diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-24 07:46:23 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-22 05:59:47 +0200 |
commit | a54f1655be4cb103a6729adcc9ca914c5fdf1ca0 (patch) | |
tree | a54cfff27d2fb3b9d04daa3490a7e601df586c18 /arch/m68k/kernel/signal.c | |
parent | sparc: kill ancient comment in sparc_sigaction() (diff) | |
download | linux-a54f1655be4cb103a6729adcc9ca914c5fdf1ca0.tar.xz linux-a54f1655be4cb103a6729adcc9ca914c5fdf1ca0.zip |
m68k: add TIF_NOTIFY_RESUME and handle it.
TIF_NOTIFY_RESUME added (as bit 5). That way nommu glue needs no changes at
all; mmu one needs just to replace jmi do_signal_return to jne do_signal_return
There we have flags shifted up, until bit 6 (SIGPENDING) is in MSBit; instead
of checking that MSBit is set (jmi) we check that MSBit or something below it
is set (jne); bits 0..4 are never set, so that's precisely "bit 6 or bit 5 is
set".
Usual handling of NOTIFY_RESUME/SIGPENDING is done in do_notify_resume(); glue
calls it instead of do_signal().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m68k/kernel/signal.c')
-rw-r--r-- | arch/m68k/kernel/signal.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index d8f6960e8fd9..d9f3d1900eed 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -43,6 +43,7 @@ #include <linux/tty.h> #include <linux/binfmts.h> #include <linux/module.h> +#include <linux/tracehook.h> #include <asm/setup.h> #include <asm/uaccess.h> @@ -1154,7 +1155,7 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, * want to handle. Thus you cannot kill init even with a SIGKILL even by * mistake. */ -asmlinkage void do_signal(struct pt_regs *regs) +static void do_signal(struct pt_regs *regs) { siginfo_t info; struct k_sigaction ka; @@ -1186,3 +1187,15 @@ asmlinkage void do_signal(struct pt_regs *regs) sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); } } + +void do_notify_resume(struct pt_regs *regs) +{ + 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(); + } +} |