about summary refs log tree commit diff
path: root/nptl/sysdeps/unix
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-03-08 09:33:12 +0100
committerThomas Schwinge <thomas@codesourcery.com>2012-03-08 09:33:12 +0100
commit48aff7765b16851c4c3c5b7beb44c878d0d24ae8 (patch)
tree5526b4e91f2306ee1eaa14ac67c52267bc49f9f5 /nptl/sysdeps/unix
parentaea5d7277a2ebd2f432bc3196e4a0e2afe8d5878 (diff)
downloadglibc-48aff7765b16851c4c3c5b7beb44c878d0d24ae8.tar.gz
glibc-48aff7765b16851c4c3c5b7beb44c878d0d24ae8.tar.xz
glibc-48aff7765b16851c4c3c5b7beb44c878d0d24ae8.zip
Fix 9554ebf2d4da22591e974d3cf2ed09a2b8dbdbd8.
| Invalid timeouts in i386 sem_timedwait.
|
| We adjusted nwaiters even though this isn't necessary.
Diffstat (limited to 'nptl/sysdeps/unix')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index 4740aee10d..03892437f6 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2011-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -64,7 +64,7 @@ sem_timedwait:
 	/* Check for invalid nanosecond field.  */
 	cmpl	$1000000000, 4(%edi)
 	movl	$EINVAL, %esi
-	jae	6f
+	jae	.Lerrno_exit
 
 	LOCK
 	incl	NWAITERS(%ecx)
@@ -146,6 +146,10 @@ sem_timedwait:
 .Lafter_ret:
 3:	negl	%esi
 6:
+	movl	28(%esp), %ebx	/* Load semaphore address.  */
+	LOCK
+	decl	NWAITERS(%ebx)
+.Lerrno_exit:
 #ifdef PIC
 	SETUP_PIC_REG(bx)
 #else
@@ -162,7 +166,6 @@ sem_timedwait:
 	movl	%esi, %gs:(%edx)
 #endif
 
-	movl	28(%esp), %ebx	/* Load semaphore address.  */
 	orl	$-1, %eax
 	jmp	10b
 	.size	sem_timedwait,.-sem_timedwait