diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-05-04 15:51:19 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-05-04 15:52:30 +0200 |
commit | 04794f3e7e9a8f61519b7d8bb5ad864431d3e488 (patch) | |
tree | 9f0ab47ad237170eaa85f3c5bef1449eed3b1ce9 | |
parent | 66355680f840f336eb83e7f46a873556a1bdedcc (diff) | |
download | glibc-04794f3e7e9a8f61519b7d8bb5ad864431d3e488.tar.gz glibc-04794f3e7e9a8f61519b7d8bb5ad864431d3e488.tar.xz glibc-04794f3e7e9a8f61519b7d8bb5ad864431d3e488.zip |
Revert "aio: fix newp->running data race"
This reverts commit fd67a9cf7b733da082e4b6a5f25c19ea7921b4cd.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/pthread/aio_misc.c | 8 |
2 files changed, 3 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog index a4501a0cae..30ab0e8075 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,13 +2,6 @@ * malloc/malloc-internal.h: Adjust header file guard. -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 faf139d901..f55570d23b 100644 --- a/sysdeps/pthread/aio_misc.c +++ b/sysdeps/pthread/aio_misc.c @@ -453,11 +453,7 @@ __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) @@ -470,7 +466,9 @@ __aio_enqueue_request (aiocb_union *aiocbp, int operation) pthread_cond_signal (&__aio_new_request_notification); } - if (result != 0) + if (result == 0) + newp->running = running; + else { /* Something went wrong. */ __aio_free_request (newp); |