diff --git a/kernel/futex.c b/kernel/futex.c index 4711f80b85..c65456c481 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -102,7 +102,7 @@ dword_t sys_futex(addr_t uaddr, dword_t op, dword_t val, addr_t timeout_or_val2, STRACE("!FUTEX_PRIVATE "); } struct timespec timeout = {0}; - if ((op & (FUTEX_WAIT_)) > 0) { + if ((op & FUTEX_CMD_MASK_) == FUTEX_WAIT_ && timeout_or_val2) { struct timespec_ timeout_; if (user_get(timeout_or_val2, timeout_)) return _EFAULT;