diff options
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r-- | fs/timerfd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c index 75d44efe346c..c502c60e4f54 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -184,6 +184,10 @@ asmlinkage long sys_timerfd_create(int clockid, int flags) | |||
184 | int ufd; | 184 | int ufd; |
185 | struct timerfd_ctx *ctx; | 185 | struct timerfd_ctx *ctx; |
186 | 186 | ||
187 | /* Check the TFD_* constants for consistency. */ | ||
188 | BUILD_BUG_ON(TFD_CLOEXEC != O_CLOEXEC); | ||
189 | BUILD_BUG_ON(TFD_NONBLOCK != O_NONBLOCK); | ||
190 | |||
187 | if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) | 191 | if (flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) |
188 | return -EINVAL; | 192 | return -EINVAL; |
189 | if (clockid != CLOCK_MONOTONIC && | 193 | if (clockid != CLOCK_MONOTONIC && |