HomeFreeBSD

libthr malloc: support recursion on thr_malloc_umtx.

Description

libthr malloc: support recursion on thr_malloc_umtx.

One possible way the recursion can happen is during fork: suppose
that fork is called from early code that did not triggered
jemalloc(3) initialization yet. Then we lock thr_malloc lock, and
call malloc_prefork() that might require initialization of jemalloc
pthread_mutexes, calling into libthr malloc. It is safe to allow
recursion for this occurence.

PR: 252579
Reported by: Vasily Postnicov <shamaz.mazum@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
kibAuthored on Jan 12 2021, 9:02 AM
Parents
rG57f22c828ec0: sigfastblock: do not skip cursig/postsig loop in ast()
Branches
Unknown
Tags
Unknown