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.23-294-gfd67a9c


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  fd67a9cf7b733da082e4b6a5f25c19ea7921b4cd (commit)
      from  066746783d6c6c0f61b39c741177e24a9b398a20 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd67a9cf7b733da082e4b6a5f25c19ea7921b4cd

commit fd67a9cf7b733da082e4b6a5f25c19ea7921b4cd
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed May 4 15:14:29 2016 +0200

    aio: fix newp->running data race
    
    	* sysdeps/pthread/aio_misc.c (__aio_enqueue_request): Do not write
    	`running` field of `newp` when a thread was started to process it,
    	since that thread will not take `__aio_requests_mutex`, and the field
    	already has the proper value actually.

diff --git a/ChangeLog b/ChangeLog
index 45e8375..575c17f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-05-04  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+	* sysdeps/pthread/aio_misc.c (__aio_enqueue_request): Do not write
+	`running` field of `newp` when a thread was started to process it,
+	since that thread will not take `__aio_requests_mutex`, and the field
+	already has the proper value actually.
+
 2016-05-04  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #19787]
diff --git a/sysdeps/pthread/aio_misc.c b/sysdeps/pthread/aio_misc.c
index f55570d..faf139d 100644
--- a/sysdeps/pthread/aio_misc.c
+++ b/sysdeps/pthread/aio_misc.c
@@ -453,7 +453,11 @@ __aio_enqueue_request (aiocb_union *aiocbp, int operation)
 		result = 0;
 	    }
 	}
+      else
+	newp->running = running;
     }
+  else
+    newp->running = running;
 
   /* Enqueue the request in the run queue if it is not yet running.  */
   if (running == yes && result == 0)
@@ -466,9 +470,7 @@ __aio_enqueue_request (aiocb_union *aiocbp, int operation)
 	pthread_cond_signal (&__aio_new_request_notification);
     }
 
-  if (result == 0)
-    newp->running = running;
-  else
+  if (result != 0)
     {
       /* Something went wrong.  */
       __aio_free_request (newp);

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

Summary of changes:
 ChangeLog                  |    7 +++++++
 sysdeps/pthread/aio_misc.c |    8 +++++---
 2 files changed, 12 insertions(+), 3 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]