x86: Add support for restartable sequences
[linux-2.6-block.git] / arch / x86 / entry / common.c
index fbf6a6c3fd2d5e94d44b0bd32b48bf4fa2bead6a..92190879b228c82f4ec681aa9c07bccc0e32204a 100644 (file)
@@ -164,6 +164,7 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
                if (cached_flags & _TIF_NOTIFY_RESUME) {
                        clear_thread_flag(TIF_NOTIFY_RESUME);
                        tracehook_notify_resume(regs);
+                       rseq_handle_notify_resume(regs);
                }
 
                if (cached_flags & _TIF_USER_RETURN_NOTIFY)
@@ -254,6 +255,8 @@ __visible inline void syscall_return_slowpath(struct pt_regs *regs)
            WARN(irqs_disabled(), "syscall %ld left IRQs disabled", regs->orig_ax))
                local_irq_enable();
 
+       rseq_syscall(regs);
+
        /*
         * First do one-time work.  If these work items are enabled, we
         * want to run them exactly once per syscall exit with IRQs on.