powerpc: Fix write-after-destroy in lock elision [BZ #20822]
commite9a96ea1aca4ebaa7c86e8b83b766f118d689d0f
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Tue, 3 Jan 2017 19:16:02 +0000 (3 17:16 -0200)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Tue, 3 Jan 2017 19:21:41 +0000 (3 17:21 -0200)
treec8171c3229049caaea73c8f5ee2f2f068c02669b
parentdaaff5cc793acdd4f8667fca3b901647b4c34363
powerpc: Fix write-after-destroy in lock elision [BZ #20822]

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.
ChangeLog
sysdeps/unix/sysv/linux/powerpc/elision-lock.c
sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
sysdeps/unix/sysv/linux/powerpc/elision-unlock.c