freebsd-nq/lib/libthr
Konstantin Belousov 25c862ae50 libthr pshared: correct a bug in allocation
When __thr_pshared_offpage() is called for allocation, it must not use
the cached offpage for the key.  Instead, the cached offpage must be
unmapped and removed from the cache, if any.

It is legitimate for the user code to unmap the shared lock object without
destroying it, and then mapping something over the freed VA to carry
another shared lock.  In this case the cached offpage must be un-cached.

PR:	269277
Reported by:	rau8344@gmail.com
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38345
2023-02-02 00:59:27 +02:00
..
arch Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
sys
tests _umtx_op: fix a compat32 bug in UMTX_OP_NWAKE_PRIVATE 2020-11-17 03:34:01 +00:00
thread libthr pshared: correct a bug in allocation 2023-02-02 00:59:27 +02:00
libthr.3 libthr(3): explain some internals of the locks implementation 2021-10-05 06:39:53 +03:00
Makefile libthr: Disable stack unwinding on ARM. 2022-02-10 12:47:08 -08:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
plockstat.d
pthread.map rtld: workaround for broken ABI 2021-04-10 17:33:33 +03:00