about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-10-07 13:33:24 +0200
committerAndreas Schwab <schwab@redhat.com>2011-10-07 13:33:24 +0200
commita8d040e18091f25f2501dfe7549f8467bac350d3 (patch)
treed433c51c36e934fa6f9309a7ec1cc644c68ac8ae
parentefabd86a00547b4b0b9d08ece165c32701661882 (diff)
parent4f2b767fef50f5f5c356c0c0e424fccc893a4ae6 (diff)
downloadglibc-a8d040e18091f25f2501dfe7549f8467bac350d3.tar.gz
glibc-a8d040e18091f25f2501dfe7549f8467bac350d3.tar.xz
glibc-a8d040e18091f25f2501dfe7549f8467bac350d3.zip
Merge remote-tracking branch 'origin/release/2.14/master' into fedora/2.14/master
-rw-r--r--ChangeLog9
-rw-r--r--NEWS9
-rw-r--r--nptl/ChangeLog9
-rw-r--r--nptl/allocatestack.c1
-rw-r--r--nptl/descr.h1
-rw-r--r--nptl/nptl-init.c1
-rw-r--r--nptl/sysdeps/pthread/list.h31
-rw-r--r--nptl_db/ChangeLog4
-rw-r--r--nptl_db/thread_dbP.h3
-rw-r--r--nss/nss_files/files-initgroups.c12
-rw-r--r--version.h2
11 files changed, 67 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 99f1f21c35..a331f72643 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-07  Andreas Schwab  <schwab@redhat.com>
+
+	* version.h (VERSION): Bump for 2.14.1 release.
+
+2011-09-27  Andreas Schwab  <schwab@redhat.com>
+
+	* nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn):
+	Reread the line before reparsing it.
+
 2011-08-29  Jiri Olsa <jolsa@redhat.com>
 
 	* sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
diff --git a/NEWS b/NEWS
index 8edf1d3852..6504f813f5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,17 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-6-4
+GNU C Library NEWS -- history of user-visible changes.  2011-10-07
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
 using `glibc' in the "product" field.
 
+Version 2.14.1
+
+* The following bugs are resolved with this release:
+
+  9696, 11724, 12841, 12849, 12852, 12868, 12885, 12922, 12935, 13007,
+  13114
+
 Version 2.14
 
 * The following bugs are resolved with this release:
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 63f7f90dd9..75184665dc 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-15  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/pthread/list.h: Define only list_t if __need_list_t is
+	defined.
+	(list_add): Add atomic_write_barrier.
+	* descr.h: Define __need_list_t before including <list.h>.
+	* nptl-init.c: Include <list.h>
+	* allocatestack.c: Likewise.
+
 2011-08-31  Andreas Schwab  <schwab@redhat.com>
 
 	* allocatestack.c (setxid_mark_thread): Ensure that the exiting
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index d4364bf218..739803ffac 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -28,6 +28,7 @@
 #include <dl-sysdep.h>
 #include <dl-tls.h>
 #include <tls.h>
+#include <list.h>
 #include <lowlevellock.h>
 #include <kernel-features.h>
 
diff --git a/nptl/descr.h b/nptl/descr.h
index 9c366e7400..e57e29e311 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -26,6 +26,7 @@
 #include <stdbool.h>
 #include <sys/types.h>
 #include <hp-timing.h>
+#define __need_list_t
 #include <list.h>
 #include <lowlevellock.h>
 #include <pthreaddef.h>
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 25b32e9f41..edcae91f04 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -29,6 +29,7 @@
 #include <atomic.h>
 #include <ldsodefs.h>
 #include <tls.h>
+#include <list.h>
 #include <fork.h>
 #include <version.h>
 #include <shlib-compat.h>
diff --git a/nptl/sysdeps/pthread/list.h b/nptl/sysdeps/pthread/list.h
index 6ddccb9fb9..cfc4abad3c 100644
--- a/nptl/sysdeps/pthread/list.h
+++ b/nptl/sysdeps/pthread/list.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -18,27 +18,39 @@
    02111-1307 USA.  */
 
 #ifndef _LIST_H
-#define _LIST_H	1
+
+#ifndef __need_list_t
+# define _LIST_H	1
+#endif
 
 /* The definitions of this file are adopted from those which can be
    found in the Linux kernel headers to enable people familiar with
    the latter find their way in these sources as well.  */
 
 
+#if defined __need_list_t || defined _LIST_H
+# ifndef __list_t_defined
+#  define __list_t_defined
 /* Basic type for the double-link list.  */
 typedef struct list_head
 {
   struct list_head *next;
   struct list_head *prev;
 } list_t;
+# endif
+# undef __need_list_t
+#endif
+
+#ifdef _LIST_H
 
+# include <atomic.h>
 
 /* Define a variable with the head and tail of the list.  */
-#define LIST_HEAD(name) \
+# define LIST_HEAD(name) \
   list_t name = { &(name), &(name) }
 
 /* Initialize a new list head.  */
-#define INIT_LIST_HEAD(ptr) \
+# define INIT_LIST_HEAD(ptr) \
   (ptr)->next = (ptr)->prev = (ptr)
 
 
@@ -49,6 +61,7 @@ list_add (list_t *newp, list_t *head)
   newp->next = head->next;
   newp->prev = head;
   head->next->prev = newp;
+  atomic_write_barrier ();
   head->next = newp;
 }
 
@@ -78,26 +91,28 @@ list_splice (list_t *add, list_t *head)
 
 
 /* Get typed element from list at a given position.  */
-#define list_entry(ptr, type, member) \
+# define list_entry(ptr, type, member) \
   ((type *) ((char *) (ptr) - (unsigned long) (&((type *) 0)->member)))
 
 
 
 /* Iterate forward over the elements of the list.  */
-#define list_for_each(pos, head) \
+# define list_for_each(pos, head) \
   for (pos = (head)->next; pos != (head); pos = pos->next)
 
 
 /* Iterate forward over the elements of the list.  */
-#define list_for_each_prev(pos, head) \
+# define list_for_each_prev(pos, head) \
   for (pos = (head)->prev; pos != (head); pos = pos->prev)
 
 
 /* Iterate backwards over the elements list.  The list elements can be
    removed from the list while doing this.  */
-#define list_for_each_prev_safe(pos, p, head) \
+# define list_for_each_prev_safe(pos, p, head) \
   for (pos = (head)->prev, p = pos->prev; \
        pos != (head); \
        pos = p, p = pos->prev)
 
+#endif /* _LIST_H */
+
 #endif	/* list.h */
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index f79fc18e4b..81ebfcdfc3 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-15  Andreas Schwab  <schwab@redhat.com>
+
+	* thread_dbP.h: Include <list.h>
+
 2009-08-23  Roland McGrath  <roland@redhat.com>
 
 	* td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): Move ta_ok check
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index e5db9bf94b..54f5fc8331 100644
--- a/nptl_db/thread_dbP.h
+++ b/nptl_db/thread_dbP.h
@@ -1,5 +1,5 @@
 /* Private header for thread debug library
-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,6 +29,7 @@
 #include "proc_service.h"
 #include "thread_db.h"
 #include "../nptl/pthreadP.h"  	/* This is for *_BITMASK only.  */
+#include <list.h>
 
 /* Indeces for the symbol names.  */
 enum
diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
index 113abf2821..c343b35e56 100644
--- a/nss/nss_files/files-initgroups.c
+++ b/nss/nss_files/files-initgroups.c
@@ -52,8 +52,10 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
   gid_t *groups = *groupsp;
 
   /* We have to iterate over the entire file.  */
-  while (!feof_unlocked (stream))
+  while (1)
     {
+      fpos_t pos;
+      fgetpos (stream, &pos);
       ssize_t n = getline (&line, &linelen, stream);
       if (n < 0)
 	{
@@ -64,9 +66,8 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
 	}
 
       struct group grp;
-      int res;
-      while ((res = _nss_files_parse_grent (line, &grp, buffer, buflen,
-					    errnop)) == -1)
+      int res = _nss_files_parse_grent (line, &grp, buffer, buflen, errnop);
+      if (res == -1)
 	{
 	  size_t newbuflen = 2 * buflen;
 	  if (buffer_use_malloc || ! __libc_use_alloca (buflen + newbuflen))
@@ -85,6 +86,9 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
 	    }
 	  else
 	    buffer = extend_alloca (buffer, buflen, newbuflen);
+	  /* Reread current line, the parser has clobbered it.  */
+	  fsetpos (stream, &pos);
+	  continue;
 	}
 
       if (res > 0 && grp.gr_gid != group)
diff --git a/version.h b/version.h
index a5408b322a..3b53b5af8c 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
 /* This file just defines the current version number of libc.  */
 
 #define RELEASE "stable"
-#define VERSION "2.14"
+#define VERSION "2.14.1"