Merge branch 'next-seccomp' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / arch / x86 / entry / common.c
index d7d3cc24baf4e5bf7c8f14e92aca44820eb8c463..1e3883e456874879e803c003c95d2b4577005455 100644 (file)
@@ -153,6 +153,9 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
                if (cached_flags & _TIF_UPROBE)
                        uprobe_notify_resume(regs);
 
+               if (cached_flags & _TIF_PATCH_PENDING)
+                       klp_update_patch_state(current);
+
                /* deal with pending signal delivery */
                if (cached_flags & _TIF_SIGPENDING)
                        do_signal(regs);
@@ -165,9 +168,6 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
                if (cached_flags & _TIF_USER_RETURN_NOTIFY)
                        fire_user_return_notifiers();
 
-               if (cached_flags & _TIF_PATCH_PENDING)
-                       klp_update_patch_state(current);
-
                /* Disable IRQs and retry */
                local_irq_disable();