From nobody Fri Dec 31 14:26:21 2021 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 B3BDB1924FEB; Fri, 31 Dec 2021 14:26:22 +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 4JQSB606nhz4kMn; Fri, 31 Dec 2021 14:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C984F5332; Fri, 31 Dec 2021 14:26:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BVEQLSA040851; Fri, 31 Dec 2021 14:26:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BVEQL3n040850; Fri, 31 Dec 2021 14:26:21 GMT (envelope-from git) Date: Fri, 31 Dec 2021 14:26:21 GMT Message-Id: <202112311426.1BVEQL3n040850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2f9116e4804d - stable/13 - fd: Initialize more export_fd_buf fields in kern_proc_cwd_out() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f9116e4804d6332c85ee6cd362263594b2d5680 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640960782; 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=VZrhKAalC8xk9Hi/1CmPk0drTBRbFhbBOpuadXMMwjk=; b=RGF+XmqQXbFTLRML/b9DT13JBpAzTqyZBag0t6I65i0SapiSvnZeQRcEpbqcVbN8Ts/JsE XRQVu8SD6CJSDE9K/YuA+lTwVw4YtrUhYwKxgtpaQurAivniKL7ibtIHwdbYPUKiYhL8iD lUsRWJmKG94ZfWxc4kKuh76LvwbRy7cuPKKoeCtK/yfbyJ5T1SFus2QUnqnzqc5rgRCyhD RYI5r33/34BFnJH0qPodSY2il0jrYw/8c3gnnL8i7zWonp+4diyuly4WfRKqpiZV7iK9qh HYnGmLq3yd1OdJz3u3zar9JCRGIYgFUonLGc+m4ot7IvsT7FdcM6pyI79t8teg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640960782; a=rsa-sha256; cv=none; b=YgAp1uXIJWluHm0iBm04FuS4LNORSpAzaJycvQ3wkbI9fEUk8efhe7cFP+TKOTofk5Yrd1 MNzsQbxuzwCHPBAUC8RU+3rxbOheKc6yZ1zmtf1MUG438g1ndyjVKE6NTsa1ozAtJWsNZA 5nUNtk7IThRZJ/ozbVqvVhbddK+uOgp1GgUp/F+e9eUsOYtgV69kGZKHQSOUXBvRGEqn4P 3dtlCDXjSqaZNl81T2IuRQs9ZmEIFOyjQB77DvmIGjiRJfYolmVQqQmdSefN3FrLuNO0ln JHC3OEzHNILMT9gZ5aYAunjmqbTn2d1IXmmM+fCPsB2R6u9WncgN2KyBGtSQ4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2f9116e4804d6332c85ee6cd362263594b2d5680 commit 2f9116e4804d6332c85ee6cd362263594b2d5680 Author: Mark Johnston AuthorDate: 2021-12-16 21:53:59 +0000 Commit: Mark Johnston CommitDate: 2021-12-31 14:26:07 +0000 fd: Initialize more export_fd_buf fields in kern_proc_cwd_out() In particular, we need to initialize efbuf->flags, since export_vnode_to_sb() loads that field. This was mostly harmless since the flag only determines whether the output kinfo_file is packed, and KERN_PROC_CWD only ever emits a single kinfo_file anyway. Sponsored by: The FreeBSD Foundation (cherry picked from commit 327060bd7799e5d4376693fba770a17b79e5a38d) --- sys/kern/kern_descrip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a8952a5e1595..651a992b0e02 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -4748,9 +4748,11 @@ kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ssize_t maxlen) return (EINVAL); efbuf = malloc(sizeof(*efbuf), M_TEMP, M_WAITOK); + efbuf->fdp = NULL; efbuf->pdp = pdp; efbuf->sb = sb; efbuf->remainder = maxlen; + efbuf->flags = 0; PWDDESC_XLOCK(pdp); pwd = PWDDESC_XLOCKED_LOAD_PWD(pdp);