aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/lowlevellock.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevellock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index eb3e689b9e..ad7510abfe 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -44,7 +44,7 @@ int
__lll_timedlock_wait (int *futex, int val, const struct timespec *abstime)
{
/* Reject invalid timeouts. */
- if (abstime->tv_nsec >= 1000000000)
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
return EINVAL;
do
@@ -100,7 +100,7 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
int tid;
- if (abstime->tv_nsec >= 1000000000)
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
return EINVAL;
/* Repeat until thread terminated. */