diff options
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/lowlevellock.c | 4 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sem_timedwait.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 8923afbfed..bd3fe4c012 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -337,7 +337,7 @@ extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime) int __result = 0; \ if (tid != 0) \ { \ - if (abstime == NULL || abstime->tv_nsec >= 1000000000) \ + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) \ __result = EINVAL; \ else \ __result = __lll_timedwait_tid (&tid, abstime); \ 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. */ diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c index 60c39d01b5..6fedd2ef0a 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.c @@ -64,7 +64,7 @@ ___lll_timedwait_tid (ptid, abstime) { int tid; - if (abstime == NULL || abstime->tv_nsec >= 1000000000) + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) return EINVAL; /* Repeat until thread terminated. */ diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c b/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c index d4d91db5ce..380091c565 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevelmutex.c @@ -48,7 +48,7 @@ ___lll_mutex_timedlock (futex, abstime, newval) int newval; { /* Reject invalid timeouts. */ - if (abstime->tv_nsec >= 1000000000) + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) return EINVAL; int oldval; diff --git a/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c index 42433dec74..273b54164a 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c +++ b/nptl/sysdeps/unix/sysv/linux/s390/sem_timedwait.c @@ -43,7 +43,7 @@ sem_timedwait (sem, abstime) return 0; /* Check for invalid timeout values. */ - if (abstime->tv_nsec >= 1000000000) + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) { __set_errno (EINVAL); return -1; diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c index 632cce4391..8a65ce2567 100644 --- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c +++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c @@ -42,7 +42,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime) } err = -EINVAL; - if (abstime->tv_nsec >= 1000000000) + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) goto error_return; do |