]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: _Fork: unlock malloc before calling fork child hooks
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 27 Jul 2021 00:03:01 +0000 (02:03 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 27 Jul 2021 00:03:01 +0000 (02:03 +0200)
The setitimer fork hook, fork_itimer, needs to call malloc inside
__mach_setup_tls, so we need to unlock malloc before calling it.

sysdeps/mach/hurd/_Fork.c

index 75d45d6cad5c3c1ad38d5d30d3076ca3a28d3eb5..88787f35ac86bce9876639e64f8132817411d402 100644 (file)
@@ -660,6 +660,7 @@ retry:
 
       /* Release malloc locks.  */
       _hurd_malloc_fork_child ();
+      call_function_static_weak (__malloc_fork_unlock_child);
 
       /* Run things that want to run in the child task to set up.  */
       RUN_HOOK (_hurd_fork_child_hook, ());