Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / fs / signalfd.c
index 5441a4b..9c39bc7 100644 (file)
@@ -211,6 +211,10 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask,
        sigset_t sigmask;
        struct signalfd_ctx *ctx;
 
+       /* Check the SFD_* constants for consistency.  */
+       BUILD_BUG_ON(SFD_CLOEXEC != O_CLOEXEC);
+       BUILD_BUG_ON(SFD_NONBLOCK != O_NONBLOCK);
+
        if (flags & ~(SFD_CLOEXEC | SFD_NONBLOCK))
                return -EINVAL;