From nobody Thu Feb 29 00:26:18 2024 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 4TlX8B74nNz5Cj5W; Thu, 29 Feb 2024 00:26:18 +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 4TlX8B5cS5z54hd; Thu, 29 Feb 2024 00:26:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709166378; 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=txYz55puojzWoEPiJ8Vc6lctg6TIsFv7RBFbYhuGPNE=; b=i/ywGKdv9YH6SXuEjdB8dGo6h2wevivN8eRrN6fOMJHfUgGl/ycublpUVvJbCcdUH2dfxx kWQS1+a8iIvYH2FVqnorlu3ZwgXHpFbiXNmeBsc73A41DxLMKS7DVjjmlwBNDL/zLAXYtA mb3vFXVAc6XRhz8PJKUMd6gppKwEvImehkslVKJbE3BBNsplR8O+q6MMwN0k/w0dyQFGf2 4DbSPHRRvQWJOrmnQdfFsKxcP9ep/KjHP84mvgnvFHBgWMkG3dIFWx7RA8G578cXb2ykip NnszLJP86k54gpeEj9kH8lfkXxrl8MkbDvabtJU6Ytvlcq1V7LevSxkzgHDddQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709166378; a=rsa-sha256; cv=none; b=kXfNmxhYeNpp6iSjOuiHSabFx9/yW+yTb0D2AbwH42xTTEdeCDYlV2V25RFzpRz5wGKcE3 389d9ER+r4SiX1T/T7MuIZ8E/caanYvbmwPXL7pTuX+IUrCQulcRzTu96ySTw2DmsQyXgC tEML0uxs/iEv7qMbAveQsp9gWuPxeH1A4ghBmNkmWdmYn8uC0QFssY0Q8ChB6Q0sS0/FIi Qr6hZy7tTsLihI17XxeSxpj+sPfHbYE/CQpkD36pFniA6E8PeHDLg8cvcP9G1bSLeIzuIC jqeiTgBDn0nSswLohKeWqSQt9gchI4cWCVcXmNbNjz+lFvBnWlT/aKDM3XQX8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709166378; 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=txYz55puojzWoEPiJ8Vc6lctg6TIsFv7RBFbYhuGPNE=; b=GRwZYwUI0JAqpByUxQbg3YczfO8UyCcNEN2+mqfemIWJIfFdt6zSlP2ZndEe95z8/15Dq2 1MpuQXpyE3LhIJSheuL2BYuj2bMsj3RuMTGKJrWjT9oe/n8PEftqGC1ijDRR/5ticAwqlr qcxkIr/xz9+mrpV6r70Wm4bT1GXmv9QdsZqPPq8PCLG9Ox5SDY7QSOSSngPMBtnzvglveA 2LBZZ9PTfJlhA90X2WdArXM6lVNDv4lBqMG1XRViaXSyOQ8zQcUSEaY0cBQPf99Ijinn+V R3eySPDLGqQPvC2hqdsEt/ZYzsvk1hrsgr2yRO7B9/fX9BtzpEhW8OmlTm49IQ== 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 4TlX8B59d2zKKr; Thu, 29 Feb 2024 00:26:18 +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 41T0QIgH096942; Thu, 29 Feb 2024 00:26:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T0QIqQ096938; Thu, 29 Feb 2024 00:26:18 GMT (envelope-from git) Date: Thu, 29 Feb 2024 00:26:18 GMT Message-Id: <202402290026.41T0QIqQ096938@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: 1545d8732d2e - stable/13 - fdlopen(3): do not create a new object mapping if already loaded 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: 1545d8732d2e076d085c08a13d3b6fc981b7f7fb Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1545d8732d2e076d085c08a13d3b6fc981b7f7fb commit 1545d8732d2e076d085c08a13d3b6fc981b7f7fb Author: Konstantin Belousov AuthorDate: 2024-02-22 01:18:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-29 00:24:43 +0000 fdlopen(3): do not create a new object mapping if already loaded PR: 277169 (cherry picked from commit 452c5e9995ab4cd6c7ea230cffe0c53bfa65c1ab) --- libexec/rtld-elf/rtld.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 3ef686441fab..e66e2f7f0f3b 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2786,8 +2786,9 @@ load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags) if (obj->ino == sb.st_ino && obj->dev == sb.st_dev) break; } - if (obj != NULL && name != NULL) { - object_add_name(obj, name); + if (obj != NULL) { + if (name != NULL) + object_add_name(obj, name); free(path); close(fd); return (obj);