about summary refs log tree commit diff
path: root/nptl/tst-sem10.c
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim@kugelworks.com>2013-12-24 09:44:50 +1300
committerMaxim Kuvyrkov <maxim@kugelworks.com>2013-12-24 09:44:50 +1300
commit362b47fe09ca9a928d444c7e2f7992f7f61bfc3e (patch)
tree6279f6a26cf21a076aeee89081d4cc350ed8dc74 /nptl/tst-sem10.c
parentb9bcbbcbe7afa94442d335811d4a1c1e0c0a1daf (diff)
downloadglibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.tar.gz
glibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.tar.xz
glibc-362b47fe09ca9a928d444c7e2f7992f7f61bfc3e.zip
Fix race in free() of fastbin chunk: BZ #15073
Perform sanity check only if we have_lock.  Due to lockless nature of fastbins
we need to be careful derefencing pointers to fastbin entries (chunksize(old)
in this case) in multithreaded environments.

The fix is to add have_lock to the if-condition checks.  The rest of the patch
only makes code more readable.

	* malloc/malloc.c (_int_free): Perform sanity check only if we
	have_lock.
Diffstat (limited to 'nptl/tst-sem10.c')
0 files changed, 0 insertions, 0 deletions