rpms/glibc/FC-6 glibc-rh220420.patch, NONE, 1.1 glibc-rh220658.patch, NONE, 1.1 glibc-strtod.patch, 1.1, 1.2 glibc-strxfrm.patch, 1.5, 1.6 glibc.spec, 1.278, 1.279

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jan 5 16:41:14 UTC 2007


Author: jakub

Update of /cvs/dist/rpms/glibc/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv29002

Modified Files:
	glibc-strtod.patch glibc-strxfrm.patch glibc.spec 
Added Files:
	glibc-rh220420.patch glibc-rh220658.patch 
Log Message:
2.5-10.fc6

glibc-rh220420.patch:
 include/atomic.h                            |    6 ++++++
 nptl/sysdeps/unix/sysv/linux/pthread_kill.c |   16 ++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

--- NEW FILE glibc-rh220420.patch ---
2006-12-21  Ulrich Drepper  <drepper at redhat.com>

	* include/atomic.h (atomic_forced_read): New macro.
nptl/
2006-12-21  Jakub Jelinek  <jakub at redhat.com>

	* sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
	tid isn't reread from pd->tid in between ESRCH test and the syscall.

--- libc/include/atomic.h	18 Oct 2006 19:02:53 -0000	1.20
+++ libc/include/atomic.h	21 Dec 2006 21:44:00 -0000	1.21
@@ -497,6 +497,12 @@
 #endif
 
 
+#ifndef atomic_forced_read
+# define atomic_forced_read(x) \
+  ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
+#endif
+
+
 #ifndef atomic_delay
 # define atomic_delay() do { /* nothing */ } while (0)
 #endif
--- libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c	28 Sep 2004 22:22:37 -0000	1.12
+++ libc/nptl/sysdeps/unix/sysv/linux/pthread_kill.c	22 Dec 2006 00:35:21 -0000	1.14
@@ -33,7 +33,15 @@ __pthread_kill (threadid, signo)
   struct pthread *pd = (struct pthread *) threadid;
 
   /* Make sure the descriptor is valid.  */
-  if (INVALID_TD_P (pd))
+  if (DEBUGGING_P && INVALID_TD_P (pd))
+    /* Not a valid thread handle.  */
+    return ESRCH;
+
+  /* Force load of pd->tid into local variable or register.  Otherwise
+     if a thread exits between ESRCH test and tgkill, we might return
+     EINVAL, because pd->tid would be cleared by the kernel.  */
+  pid_t tid = atomic_forced_read (pd->tid);
+  if (__builtin_expect (tid <= 0, 0))
     /* Not a valid thread handle.  */
     return ESRCH;
 
@@ -53,15 +61,15 @@ __pthread_kill (threadid, signo)
   int val;
 #if __ASSUME_TGKILL
   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
-			  pd->tid, signo);
+			  tid, signo);
 #else
 # ifdef __NR_tgkill
   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
-			  pd->tid, signo);
+			  tid, signo);
   if (INTERNAL_SYSCALL_ERROR_P (val, err)
       && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
 # endif
-    val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo);
+    val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo);
 #endif
 
   return (INTERNAL_SYSCALL_ERROR_P (val, err)

glibc-rh220658.patch:
 compat-grp.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

--- NEW FILE glibc-rh220658.patch ---
2006-12-22  Gavin Romig-Koch  <gavin at redhat.com>

	* nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't
	blacklist the group till after we look it up.

--- libc/nis/nss_compat/compat-grp.c	31 Jul 2006 23:33:04 -0000	1.32
+++ libc/nis/nss_compat/compat-grp.c	22 Dec 2006 20:26:11 -0000	1.33
@@ -580,13 +580,17 @@ internal_getgrgid_r (gid_t gid, struct g
       /* +group */
       if (result->gr_name[0] == '+' && result->gr_name[1] != '\0')
 	{
+	  /* Yes, no +1, see the memcpy call below.  */
+	  size_t len = strlen (result->gr_name);
+	  char buf[len];
 	  enum nss_status status;
 
 	  /* Store the group in the blacklist for the "+" at the end of
 	     /etc/group */
-	  blacklist_store_name (&result->gr_name[1], ent);
+	  memcpy (buf, &result->gr_name[1], len);
 	  status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
 				       buffer, buflen, errnop);
+	  blacklist_store_name (buf, ent);
 	  if (status == NSS_STATUS_SUCCESS && result->gr_gid == gid)
 	    break;
 	  else

glibc-strtod.patch:
 Makefile      |    4 +++-
 strtod_l.c    |   38 ++++++++++++++++++++------------------
 tst-atof1.c   |   19 +++++++++++++++++++
 tst-atof2.c   |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tst-strtod2.c |   25 +++++++++++++++++++++++++
 tst-strtod3.c |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 177 insertions(+), 19 deletions(-)

Index: glibc-strtod.patch
===================================================================
RCS file: /cvs/dist/rpms/glibc/FC-6/glibc-strtod.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- glibc-strtod.patch	19 Dec 2006 23:23:44 -0000	1.1
+++ glibc-strtod.patch	5 Jan 2007 16:41:11 -0000	1.2
@@ -1,3 +1,7 @@
+2007-01-03  Ulrich Drepper  <drepper at redhat.com>
+
+	* stdlib/Makefile (tst-strtod3-ENV): Define.
+
 2006-12-11  Ulrich Drepper  <drepper at redhat.com>
 
 	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
@@ -133,6 +137,14 @@
  
  include ../Makeconfig
  
+@@ -113,6 +113,7 @@ include ../Rules
+ test-canon-ARGS = --test-dir=${common-objpfx}stdlib
+ 
+ tst-strtod-ENV = LOCPATH=$(common-objpfx)localedata
++tst-strtod3-ENV = LOCPATH=$(common-objpfx)localedata
+ testmb2-ENV = LOCPATH=$(common-objpfx)localedata
+ 
+ # Run a test on the header files we use.
 --- libc/stdlib/tst-atof1.c	1 Jan 1970 00:00:00 -0000
 +++ libc/stdlib/tst-atof1.c	10 Dec 2006 09:54:35 -0000	1.1
 @@ -0,0 +1,19 @@

glibc-strxfrm.patch:
 Makefile       |    3 +-
 strxfrm_l.c    |    8 +++--
 tst-strxfrm2.c |   83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 4 deletions(-)

Index: glibc-strxfrm.patch
===================================================================
RCS file: /cvs/dist/rpms/glibc/FC-6/glibc-strxfrm.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- glibc-strxfrm.patch	19 Dec 2006 23:23:44 -0000	1.5
+++ glibc-strxfrm.patch	5 Jan 2007 16:41:11 -0000	1.6
@@ -1,3 +1,7 @@
+2007-01-03  Ulrich Drepper  <drepper at redhat.com>
+
+	* string/Makefile (tst-strxfrm2-ENV): Define.
+
 2006-11-10  Jakub Jelinek  <jakub at redhat.com>
 
 	* string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
@@ -18,7 +22,7 @@
 	optimization even if needed > n.
 
 --- libc/string/Makefile	4 Jun 2006 16:35:25 -0000	1.69
-+++ libc/string/Makefile	9 Nov 2006 20:19:24 -0000	1.70
++++ libc/string/Makefile	9 Nov 2006 20:19:24 -0000	1.71
 @@ -54,7 +54,7 @@ tests		:= tester inl-tester noinl-tester
  		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
  		   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry	\
@@ -28,6 +32,14 @@
  distribute	:= memcopy.h pagecopy.h tst-svc.expect test-string.h
  
  
+@@ -64,6 +64,7 @@ tester-ENV = LANGUAGE=C
+ inl-tester-ENV = LANGUAGE=C
+ noinl-tester-ENV = LANGUAGE=C
+ tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
++tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
+ CFLAGS-inl-tester.c = -fno-builtin
+ CFLAGS-noinl-tester.c = -fno-builtin
 --- libc/string/strxfrm_l.c	15 Oct 2005 20:49:18 -0000	1.5
 +++ libc/string/strxfrm_l.c	10 Nov 2006 15:18:46 -0000	1.7
 @@ -96,6 +97,7 @@ STRXFRM (STRING_TYPE *dest, const STRING


Index: glibc.spec
===================================================================
RCS file: /cvs/dist/rpms/glibc/FC-6/glibc.spec,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -r1.278 -r1.279
--- glibc.spec	19 Dec 2006 23:23:44 -0000	1.278
+++ glibc.spec	5 Jan 2007 16:41:11 -0000	1.279
@@ -3,7 +3,7 @@
 %define glibcsrcdir glibc-2.5-20061008T1257
 %define glibc_release_tarballs 0
 %define glibcversion 2.5
-%define glibcrelease 8%{?dist}
+%define glibcrelease 10%{?dist}
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define xenarches i686 athlon
 %ifarch %{xenarches}
@@ -70,6 +70,8 @@
 Patch33: glibc-rh219107.patch
 Patch34: glibc-rh219145.patch
 Patch35: glibc-tst-pselect.patch
+Patch36: glibc-rh220420.patch
+Patch37: glibc-rh220658.patch
 Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root
 Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers,
 Obsoletes: gencat, locale, ldconfig, locale-ja, glibc-profile
@@ -315,6 +317,8 @@
 %patch33 -p1
 %patch34 -p1
 %patch35 -p1
+%patch36 -p1
+%patch37 -p1
 
 # Hack till glibc-kernheaders get updated, argh
 mkdir -p override_headers/linux
@@ -1617,7 +1621,15 @@
 %endif
 
 %changelog
-* Tue Dec 19 2006 Jakub Jelinek <jakub at redhat.com> 2.5-8.fc6
+* Fri Jan  5 2007 Jakub Jelinek <jakub at redhat.com> 2.5-10.fc6
+- fix nss_compat +group handling (#220658)
+
+* Fri Dec 22 2006 Jakub Jelinek <jakub at redhat.com> 2.5-9
+- make sure pthread_kill doesn't return EINVAL even if
+  the target thread exits in between pthread_kill ESRCH check
+  and the actual tgkill syscall (#220420)
+
+* Tue Dec 19 2006 Jakub Jelinek <jakub at redhat.com> 2.5-8
 - fix setcontext on ppc32 (#219107)
 - fix wide stdio after setvbuf (#217064, BZ#2337)
 - fix {j,m}rand48{,_r} on 64-bit arches (BZ#3747)




More information about the fedora-cvs-commits mailing list