diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-04-13 14:10:49 -0500 |
---|---|---|
committer | Paul E. Murphy <murphyp@linux.vnet.ibm.com> | 2016-04-13 14:10:49 -0500 |
commit | eb8c932bac2e6c1273107b8a2721f382575b002a (patch) | |
tree | e0d41098b7c5e9b3fba8a8374aa563b9fe8c8891 /dirent/scandir64.c | |
parent | 00cd4dad175f648783f808aef681d16c10fc34fa (diff) | |
download | glibc-eb8c932bac2e6c1273107b8a2721f382575b002a.tar glibc-eb8c932bac2e6c1273107b8a2721f382575b002a.tar.gz glibc-eb8c932bac2e6c1273107b8a2721f382575b002a.tar.bz2 glibc-eb8c932bac2e6c1273107b8a2721f382575b002a.zip |
malloc: Fix list_lock/arena lock deadlock [BZ #19182]
* malloc/arena.c (list_lock): Document lock ordering requirements.
(free_list_lock): New lock.
(ptmalloc_lock_all): Comment on free_list_lock.
(ptmalloc_unlock_all2): Reinitialize free_list_lock.
(detach_arena): Update comment. free_list_lock is now needed.
(_int_new_arena): Use free_list_lock around detach_arena call.
Acquire arena lock after list_lock. Add comment, including FIXME
about incorrect synchronization.
(get_free_list): Switch to free_list_lock.
(reused_arena): Acquire free_list_lock around detach_arena call
and attached threads counter update. Add two FIXMEs about
incorrect synchronization.
(arena_thread_freeres): Switch to free_list_lock.
* malloc/malloc.c (struct malloc_state): Update comments to
mention free_list_lock.
(cherry picked from commit 90c400bd4904b0240a148f0b357a5cbc36179239)
Diffstat (limited to 'dirent/scandir64.c')
0 files changed, 0 insertions, 0 deletions