From patchwork Fri Apr 24 10:55:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 38864 X-Patchwork-Delegate: carlos@redhat.com Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id C161A38930D5 for ; Fri, 24 Apr 2020 10:55:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C161A38930D5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jRvzf-0003FA-Kg for libc-alpha@sourceware.org; Fri, 24 Apr 2020 10:55:39 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jRvzf-0006Xc-HG for libc-alpha@sourceware.org; Fri, 24 Apr 2020 12:55:39 +0200 From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] elf: Remove redundant add_to_global_resize_failure call from dl_open_args Date: Fri, 24 Apr 2020 12:55:39 +0200 Message-ID: <87y2ql9mqc.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 X-Spam-Status: No, score=-21.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 10:55:42 -0000 The second call does not do anything because the data structures have already been resized by the call that comes before the demarcation point. Fixes commit a509eb117fac1d764b15eba64993f4bdb63d7f3c ("Avoid late dlopen failure due to scope, TLS slotinfo updates [BZ #25112]"). ----- Tested on i686-linux-gnu and x86_64-linux-gnu. elf/dl-open.c | 5 ----- 1 file changed, 5 deletions(-) Reviewed-by: Carlos O'Donell diff --git a/elf/dl-open.c b/elf/dl-open.c index 7b3b177aa6..d9fdb0bdce 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -738,11 +738,6 @@ dl_open_worker (void *a) DL_STATIC_INIT (new); #endif - /* Perform the necessary allocations for adding new global objects - to the global scope below, via add_to_global_update. */ - if (mode & RTLD_GLOBAL) - add_to_global_resize (new); - /* Run the initializer functions of new objects. Temporarily disable the exception handler, so that lazy binding failures are fatal. */