From nobody Sun Aug 27 00:51:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RYFW35SCcz4rGLN; Sun, 27 Aug 2023 00:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RYFW34nH2z3PKY; Sun, 27 Aug 2023 00:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693097487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8SUxiME+NndK34D1iFZtq8IWxMs0Jv8BCOLdveK9nw=; b=sJ6jjbFiG9OdIlHy4B3uMnzfev8dGnmLKvNvfULp0TwYRl5r0wGv76GNksXhyuXLuGxjSQ wMxjNdtkUUJ1nbvJOfEWki4eSuHKqrbMb4wZ9/Z/kk6un4Jad1xtVIRoSbs60Jn57HmpTR Pr64KaFg+k/Y+S+AB0MOT2ssIEUoBzxhoiLHtasFTPLvgxgFUdOjjeS/Lau8Cni7iIAAGF OwEmSqENKFrGWyiy5dYJXnoCIxcjEnVjq8CICL3519MptFkNJ/gaq7WC1nRr0Lx2ffb9F6 d/H+uwBagi29TK5gopDXaKVlpdfyutYUvEk4B6LWpl3tohLHsNlt80xzaCYTXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693097487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8SUxiME+NndK34D1iFZtq8IWxMs0Jv8BCOLdveK9nw=; b=v/MipwSb1eqJa3i8PDyixhcCCbmKXQKRitva6HnEMhV+FLvUfqs5DiLSILVfrx/4yZDjpg 3lNMVyEwKB16xamXhXYVD0+HNna2SA4TUXcs0a770zT06mbFAf9NNxKF2N9bwFoQkROQ2h NG236SOAcf2cgdD6WpTniwOgIL94obuifs2WlRSeT+7d26RxTyjDl4/5m2QjfpQaNjijr0 aQvm04L37qE/VbFB/V+B4eIRey1yx53E0z5aBHFUN/aSBPsIfIl6IIgMt4p+s/FpwhQVOr pkDi/V3iiEBv0WJ4R9X+YZwZZD9+gxTuTWe8Vfv/ZkBq7hY32bBICxWu9ArsIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693097487; a=rsa-sha256; cv=none; b=bQ1Ql0yHFw7lJF46k+yDtKnm0fwSiqRsD05r0j5+u2Sy77meXB4+gD9LFu15xvBugeYzQ+ o09RpCsc+f3YTUyKJF+uJVyYYocMWy1ffxUhjzdys6scfRbbqu0bGahtzBPpohaliG2Vy3 6uvTO1f23TKoN42BsdpIEESdMisFvAa+MMnM+/icZa+QlJkVKuywY+REAgq2P5HvpPziXS N4tlfjNG6soWGPO7ML0RaMvJDkQEV/9EsNkAh1k1sk6OK0sHBK4R/KqB0BsUYMbSoR9imY Hsj/t+dKh6IXjYCS5nNJzf3Wy63X65SB3Npw/f7BNXzX8w6dNzt0IrXoDX8/sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RYFW33rlpzwgY; Sun, 27 Aug 2023 00:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37R0pR4A027427; Sun, 27 Aug 2023 00:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37R0pRbK027424; Sun, 27 Aug 2023 00:51:27 GMT (envelope-from git) Date: Sun, 27 Aug 2023 00:51:27 GMT Message-Id: <202308270051.37R0pRbK027424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cee16ae06de7 - stable/13 - rtld: unlock bind lock when calling into crt __pthread_distribute_static_tls method List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cee16ae06de7c08cf97c918d73cfac33cc056a2d Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cee16ae06de7c08cf97c918d73cfac33cc056a2d commit cee16ae06de7c08cf97c918d73cfac33cc056a2d Author: Konstantin Belousov AuthorDate: 2023-08-18 19:52:24 +0000 Commit: Konstantin Belousov CommitDate: 2023-08-27 00:50:17 +0000 rtld: unlock bind lock when calling into crt __pthread_distribute_static_tls method (cherry picked from commit b1d3e2b771552af071bf0964233cc5a76ea25542) --- libexec/rtld-elf/rtld.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index e3f87c6504a5..e8b901bda634 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5943,8 +5943,10 @@ distribute_static_tls(Objlist *list, RtldLockState *lockstate) obj = elm->obj; if (obj->marker || !obj->tls_static || obj->static_tls_copied) continue; + lock_release(rtld_bind_lock, lockstate); distrib(obj->tlsoffset, obj->tlsinit, obj->tlsinitsize, obj->tlssize); + wlock_acquire(rtld_bind_lock, lockstate); obj->static_tls_copied = true; } }