unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd, commited] hurd: _Fork: unlock malloc before calling fork child hooks
@ 2021-07-27  0:06 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2021-07-27  0:06 UTC (permalink / raw)
  To: libc-alpha; +Cc: commit-hurd

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c
index 75d45d6cad..88787f35ac 100644
--- a/sysdeps/mach/hurd/_Fork.c
+++ b/sysdeps/mach/hurd/_Fork.c
@@ -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, ());
-- 
2.30.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-27  0:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  0:06 [hurd, commited] hurd: _Fork: unlock malloc before calling fork child hooks Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).