public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: _Fork: unlock malloc before calling fork child hooks
Date: Tue, 27 Jul 2021 00:06:03 +0000 (GMT)	[thread overview]
Message-ID: <20210727000603.A96E93848407@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=de2f68c3c751df1925c50ebf3be1c9d9f79b1dcf

commit de2f68c3c751df1925c50ebf3be1c9d9f79b1dcf
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Jul 27 02:03:01 2021 +0200

    hurd: _Fork: unlock malloc before calling fork child hooks
    
    The setitimer fork hook, fork_itimer, needs to call malloc inside
    __mach_setup_tls, so we need to unlock malloc before calling it.

Diff:
---
 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, ());


                 reply	other threads:[~2021-07-27  0:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727000603.A96E93848407@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).