This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Ping Re: [PATCHv3] powerpc: Fix write-after-destroy in lock elision
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org, vapier at gentoo dot org, triegel at redhat dot com
- Cc: raji at linux dot vnet dot ibm dot com, munroesj at linux dot vnet dot ibm dot com
- Date: Mon, 02 Jan 2017 12:12:54 -0200
- Subject: Ping Re: [PATCHv3] powerpc: Fix write-after-destroy in lock elision
- Authentication-results: sourceware.org; auth=none
- References: <20161212043646.GL10558@vapier.lan> <1482343384-28430-1-git-send-email-tuliom@linux.vnet.ibm.com>
Ping?
Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> writes:
> From: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
>
> Changes since v2:
> - Fixed coding style.
>
> Changes since v1:
> - Removed references to data race by the actual error: write-after-destroy.
> - Enclosed adapt_count accesses in C11 atomics.
>
> --- 8< ---
>
> The update of *adapt_count after the release of the lock causes a race
> condition when thread A unlocks, thread B continues and destroys the
> mutex, and thread A writes to *adapt_count.
>
> 2016-12-21 Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
> Steven Munroe <sjmunroe@us.ibm.com>
> Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>
> [BZ #20822]
> * sysdeps/unix/sysv/linux/powerpc/elision-lock.c
> (__lll_lock_elision): Access adapt_count via C11 atomics.
> * sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
> (__lll_trylock_elision): Likewise.
> * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
> (__lll_unlock_elision): Update adapt_count variable inside the
> critical section.
--
Tulio Magno