From nobody Fri Dec 17 18:11:50 2021 X-Original-To: dev-commits-src-main@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 011D818EFC33; Fri, 17 Dec 2021 18:11:52 +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 4JFxrl0d7tz4j8k; Fri, 17 Dec 2021 18:11:51 +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 AB95F20834; Fri, 17 Dec 2021 18:11:50 +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 1BHIBonj005052; Fri, 17 Dec 2021 18:11:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BHIBoV8005051; Fri, 17 Dec 2021 18:11:50 GMT (envelope-from git) Date: Fri, 17 Dec 2021 18:11:50 GMT Message-Id: <202112171811.1BHIBoV8005051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 327060bd7799 - main - fd: Initialize more export_fd_buf fields in kern_proc_cwd_out() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 327060bd7799e5d4376693fba770a17b79e5a38d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639764711; 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=mDfURVNoIfySLZfpxH/SYqCnY0DtU0jco/dOhJ5j180=; b=JuRNkeZu4FbdM50q13bGlAN3ikGpkbxPD2BRWVOXvKKE8S+i435/5VKl342KuGSTIFVDoV UwstjkHV4/PdfyTYbpF8jLp8PIby9a9ihaF7DZdct25OsrBtJ5YuK8Vrxnoo4axfu2Dctx gwGUDvJr+rQWJvD3l6UpEUzEEuoxxyicW9sK+P6991OYS2zouxbHpnc5sfRnkk/y0yiTAi JhZhc3VkNmG3xaluVectESqqyBAaTQ5wSCSH4aq48I4j83ou7sfB35WODMw1Nn7puH2zLB VjJKFOkoffhXTBHtQIYgxhTc+6epTepv5S7o0Assc0+C0MP4W4QNN8rIL0YICQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639764711; a=rsa-sha256; cv=none; b=nz+BbNE2Yx+EGTbcuLvdb0Fvma1B8qz93Af2WvbOMX9Fc0Bvs+stX1Nr6/PvnYEeEX/i23 KOdNzOxrZNSX4EhH3tY6uydukr2s/BWXN/nB3hV6rbl/SXVmd68dOyZcct/p0M0xfFz2kK BJARQTSGdg/Tn5Gexciibtpx9ZiRikjAMORK5YaF6dnFu+HxYaUrP8UCjy7/KLHt0l4wvA 2pRuupT2qMzD3/yPqqvA1mkOwztsU9iWgAPQ7u7qNoGklER0fIk13QQpmHxq3/xDgBpFv6 M0WGDdmN4cM7yrp0uN+mKsLEKzmBEeu8E81rB1h+kzdhJCuOscFV45giv6ujkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=327060bd7799e5d4376693fba770a17b79e5a38d commit 327060bd7799e5d4376693fba770a17b79e5a38d Author: Mark Johnston AuthorDate: 2021-12-16 21:53:59 +0000 Commit: Mark Johnston CommitDate: 2021-12-17 18:10:22 +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. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- 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 03cc77ff31ba..fb2dc4fdc94e 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -4660,9 +4660,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);