diff --git a/kernel/futex.c b/kernel/futex.c index 1554a07a13..45696b189a 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -104,7 +104,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;