From patchwork Thu Oct 5 15:17:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 821882 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-85453-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="BjQ3f3Mx"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7GcH3sXlz9s7M for ; Fri, 6 Oct 2017 02:18:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=Mqd8VMoHjEpY86eJngwxOKoquWJ4P gJkts0AzovbXuq5teXcUMCE2s6c5PEz/ojl1rixuT5uw8fdivKyuNhG5FzNw1Y/I NNM9abpzmlVDddInKohoPanzTaaxD8X7SLfGquFIMDx2MYBVuxlEbFJAYi2ZycPC yM8jgIZWcRpMyY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=5ulnraKiJ2rDFb4gmbGNwA6K1hk=; b=BjQ 3f3MxHhWD3JHT1R1/PJKcjuKSQ5jsfVss7eoGDjmZzZdF/Ok0oo8j0MOWePneaR7 esf7lKV+vJ8gTLiR86XEdq5ZQlqdXxb/orZ/jTQBVT3JFhzYkJsi9RVTSB51JWbr 1dHhXYQv3kMdBfuGXmHBBbanfIGl7rwoeTlBcYhI= Received: (qmail 77032 invoked by alias); 5 Oct 2017 15:18:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 76894 invoked by uid 89); 5 Oct 2017 15:18:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=protect X-HELO: mx1.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] Reinitialize dl_load_write_lock on fork (bug 19282) X-Yow: Here is my refrigerator full of FLANK STEAK...and over there is my UPHOLSTERED CANOE...I don't know WHY I OWN them!! Date: Thu, 05 Oct 2017 17:17:55 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 * sysdeps/nptl/fork.c (__libc_fork): Reinitialize GL(dl_load_write_lock). --- sysdeps/nptl/fork.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c index 4bb87e2331..a3ed9e8945 100644 --- a/sysdeps/nptl/fork.c +++ b/sysdeps/nptl/fork.c @@ -194,8 +194,9 @@ __libc_fork (void) _IO_list_resetlock (); } - /* Reset the lock the dynamic loader uses to protect its data. */ + /* Reset the locks the dynamic loader uses to protect its data. */ __rtld_lock_initialize (GL(dl_load_lock)); + __rtld_lock_initialize (GL(dl_load_write_lock)); /* Run the handlers registered for the child. */ while (allp != NULL)