Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / kernel / rseq.c
index 81d7dc8..bda8175 100644 (file)
@@ -176,7 +176,7 @@ static int rseq_need_restart(struct task_struct *t, u32 cs_flags)
        u32 flags, event_mask;
        int ret;
 
-       if (WARN_ON_ONCE(cs_flags & RSEQ_CS_NO_RESTART_FLAGS))
+       if (WARN_ON_ONCE(cs_flags & RSEQ_CS_NO_RESTART_FLAGS) || cs_flags)
                return -EINVAL;
 
        /* Get thread flags. */
@@ -184,7 +184,7 @@ static int rseq_need_restart(struct task_struct *t, u32 cs_flags)
        if (ret)
                return ret;
 
-       if (WARN_ON_ONCE(flags & RSEQ_CS_NO_RESTART_FLAGS))
+       if (WARN_ON_ONCE(flags & RSEQ_CS_NO_RESTART_FLAGS) || flags)
                return -EINVAL;
 
        /*