From: Al Viro Date: Tue, 24 Apr 2012 06:37:07 +0000 (-0400) Subject: um: add TIF_NOTIFY_RESUME X-Git-Tag: v3.5-rc1~133^2^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d50349b0c397407458ea8c57aee765d158e6f9ee;p=platform%2Fkernel%2Flinux-exynos.git um: add TIF_NOTIFY_RESUME Signed-off-by: Al Viro --- diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index 200c4ab..6d85ebb 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h @@ -71,6 +71,7 @@ static inline struct thread_info *current_thread_info(void) #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ #define TIF_SYSCALL_AUDIT 6 #define TIF_RESTORE_SIGMASK 7 +#define TIF_NOTIFY_RESUME 8 #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 2b73ded..4d9af31 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -114,8 +115,13 @@ void interrupt_end(void) { if (need_resched()) schedule(); - if (test_tsk_thread_flag(current, TIF_SIGPENDING)) + if (test_thread_flag(TIF_SIGPENDING)) do_signal(); + if (test_and_clear_thread_flag(TIF_NOTIFY_RESUME)) { + tracehook_notify_resume(¤t->thread.regs); + if (current->replacement_session_keyring) + key_replace_session_keyring(); + } } void exit_thread(void)