diff options
author | cheloha <cheloha@cvs.openbsd.org> | 2019-01-18 05:06:39 +0000 |
---|---|---|
committer | cheloha <cheloha@cvs.openbsd.org> | 2019-01-18 05:06:39 +0000 |
commit | d571f38fd5117df0370712be6a0b207950943329 (patch) | |
tree | 90ae60b6eba356f9eb87fc4b9fdd747de64ed6be /lib | |
parent | 1018edf4e57ce0fab8eddf572afe4b57c448ba07 (diff) |
futex(2): validate relative timeout before sleeping.
Linux does validation.
Document this new failure case as an EINVAL, like Linux.
"stop waiting" deraadt
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/futex.2 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/sys/futex.2 b/lib/libc/sys/futex.2 index 1fc2d080a95..6dfc12f0617 100644 --- a/lib/libc/sys/futex.2 +++ b/lib/libc/sys/futex.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: futex.2,v 1.4 2018/04/24 17:19:35 pirofti Exp $ +.\" $OpenBSD: futex.2,v 1.5 2019/01/18 05:06:37 cheloha Exp $ .\" .\" Copyright (c) 2017 Martin Pieuchot .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 24 2018 $ +.Dd $Mdocdate: January 18 2019 $ .Dt FUTEX 2 .Os .Sh NAME @@ -116,6 +116,11 @@ The value pointed to by .Fa uaddr is not the same as the expected value .Fa val . +.It Bq Er EINVAL +The +.Fa timeout +specified a second value less than zero, +or a nanosecond value less than zero or greater than or equal to 1000 million. .It Bq Er ETIMEDOUT The .Fa timeout |