This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.10-158-g50158f9


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  50158f95525ca59459a90f2a7bc65ceb892a0807 (commit)
      from  bec466d922ee22b94ac0d00415fb605e136efe6e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50158f95525ca59459a90f2a7bc65ceb892a0807

commit 50158f95525ca59459a90f2a7bc65ceb892a0807
Author: Andreas Schwab <aschwab@redhat.com>
Date:   Thu Jul 16 09:57:32 2009 -0700

    Use correct release semantic in list update.
    
    nscd uses lockfree lists and we need to ensure the correct release
    semantics is used when adding to the list.

diff --git a/ChangeLog b/ChangeLog
index 6ddf9a1..a81c5b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
 2009-07-16  Ulrich Drepper  <drepper@redhat.com>
+
+	* nscd/cache.c (cache_add): Use atomic_compare_and_exchange_bool_rel
+	instead of atomic_compare_and_exchange_bool_acq to ensure pointer
+	is written before the list head update.
+	Patch by Andreas Schwab <aschwab@redhat.com>.
+
 	    Jakub Jelinek  <jakub@redhat.com>
 
 	* malloc/malloc.c [ATOMIC_FASTBINS] (_int_free): Make check for
diff --git a/nscd/cache.c b/nscd/cache.c
index ab842ef..3e6793d 100644
--- a/nscd/cache.c
+++ b/nscd/cache.c
@@ -179,7 +179,7 @@ cache_add (int type, const void *key, size_t len, struct datahead *packet,
   /* Put the new entry in the first position.  */
   do
     newp->next = table->head->array[hash];
-  while (atomic_compare_and_exchange_bool_acq (&table->head->array[hash],
+  while (atomic_compare_and_exchange_bool_rel (&table->head->array[hash],
 					       (ref_t) ((char *) newp
 							- table->data),
 					       (ref_t) newp->next));

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    6 ++++++
 nscd/cache.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]