* WARNING: We are in CONTEXT_USER and RCU isn't paying attention!
         */
        local_irq_enable();
-       if (get_user(*(u32 *)®s->cx,
-                    (u32 __user __force *)(unsigned long)(u32)regs->sp)) {
+       if (
+#ifdef CONFIG_X86_64
+               /*
+                * Micro-optimization: the pointer we're following is explicitly
+                * 32 bits, so it can't be out of range.
+                */
+               __get_user(*(u32 *)®s->cx,
+                           (u32 __user __force *)(unsigned long)(u32)regs->sp)
+#else
+               get_user(*(u32 *)®s->cx,
+                        (u32 __user __force *)(unsigned long)(u32)regs->sp)
+#endif
+               ) {
+
                /* User code screwed up. */
                local_irq_disable();
                regs->ax = -EFAULT;