From nobody Thu Feb 29 00:24:31 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 4TlX676r2Fz5ChfC; Thu, 29 Feb 2024 00:24:31 +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 4TlX6767Cxz53XN; Thu, 29 Feb 2024 00:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709166271; 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=7IeSmWu1k2b4eAR8KkG3hUr77O28KK8T9M/3Qe+xAQE=; b=NJ6RBats+pFi3+jKv8Okc1jOFxps7JK5z6jFlPQvAZ+SBMNCOHMg1cNnBKUIxxW2rjBsGL l+k2KJMET2UqAuCWKmIWsq9zAup3+S0z2LuFMPG63kWRvRwRKupEpftET6XeaSzsI8GJnT YVuA3SZVTB6ADTY++/a/XjzCTsSz3GH56Kf5se++GKBkzSiCR0ZtJs3TNY4mOaLxeW8z8X AzBlBw6i+nGK0jMwO2L7dpQYRr4qI3cy6edhsOPxBc6pdkJQdoOp1YEuIoZ4b5bugaXYwR 5QnAiyHzAETi9BbTQgCZDNgIA8+4SE7c1WhZI5xBzI8L1+UWd4JAxRzA0exAkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709166271; a=rsa-sha256; cv=none; b=r/vx6WNTQg3uxKW7e5/Awo5iid32QQVfvNrNsqMzBvWKW06VAZWDQ91VnGqO+73r+3potR OJJK5bKgOWApSHVLp14FmSSQqtZWK3kfCxyUGQxI5rAgPl1Rr37OQFLObIM5snwo6OXfqM EWT1FaD7lyycLAqbhOv8zvfxBNOuJT8K3IvC2ktRUJCqN7YedNYaM6eN6iY/rDwAzfL/mt iUjAWky6zTu5bkYVlFvP4ntnsBbFoD4sSfWzDaPEN9m4flEmOE8MOwmEVweINAynM0GDbT dxjRN+8oWTdmhbsnxf4Nl0RXW/yqK3wM7dr8Ad5+2pjOrFRA3Da0+zag9Vs2kA== 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=1709166271; 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=7IeSmWu1k2b4eAR8KkG3hUr77O28KK8T9M/3Qe+xAQE=; b=YFrIGKL+z0NPyw1Q3xHHY2jsKt+wXsyKKxpCwOzfh13VLY4qTCz/WOBptRY2dB+Vo/YpZ/ ZTu88+Aw3tIhBtXlQNv+WHenhadfp3yemQMKbmTCkBgMK+iiTDIF/2lKc4C8EO1f16ydne y08s5+IHiFuGZGtj8DNw1Kq7lSMWgEmLNVVF97houcQoyq76NH1YZ2I6wv8uExO1rtm/ak 52l+BftPbfwdf7Ej8Nt6xbK0MGi09OzUoHHUUk90+zlxWMylLyC22mrJaFeMDrJmPEddt2 //ALtJrv2KqpUJ/aqbxyG1Zt4nPfOVLk7tQxscK3Z4MjwxyPw/xw1UKLszWV9Q== 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 4TlX675jwgzKKj; Thu, 29 Feb 2024 00:24:31 +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 41T0OVCO096235; Thu, 29 Feb 2024 00:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T0OVUH096232; Thu, 29 Feb 2024 00:24:31 GMT (envelope-from git) Date: Thu, 29 Feb 2024 00:24:31 GMT Message-Id: <202402290024.41T0OVUH096232@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: 11137153ab90 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 11137153ab90c38cc5e9993f5c65491c47705024 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=11137153ab90c38cc5e9993f5c65491c47705024 commit 11137153ab90c38cc5e9993f5c65491c47705024 Author: Konstantin Belousov AuthorDate: 2024-02-22 01:18:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-29 00:24:06 +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 d32c80debc1d..f11fe8afcc32 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2742,8 +2742,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);