From nobody Mon Aug 7 14:24:18 2023 X-Original-To: dev-commits-src-branches@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 4RKJVC1CrDz4phSr; Mon, 7 Aug 2023 14:24:19 +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 4RKJVB6gW0z4LFR; Mon, 7 Aug 2023 14:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418258; 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=XWl10pX1T45+LsYyB4wCQyhNq7HIbwQ4lXxu8qhLTdo=; b=pxfG68mYh/TtbtxmnGVMEPkzxhpzsT0qSfZGXtp1OKHmfY1E6mLV11HBU/BW1pSI9nXoXa x64jnG9Yw/uDMur2Ma030MztqoUUNdnIY4SlQQv6B8aBgwqEORIEQYDzReplHDsCR596Zd CMr3qmI2pLav1nM/EolKA35CYoYx1A/yXuMFsU/5KhZz0OUhYBldHTlujKBGUg74CbBcha dovDv36roo4LezfvmkXS+bhTIUmC/MDc7khs1HwWs/DQ9eSmkkuqsIpnYdzKbocqeaCGx5 qBxZesSBaWxKuhNKHlDXmX6PmqYt0ibavq6WWYxQtiLaYUpiv6LRiyi6IeElYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418258; 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=XWl10pX1T45+LsYyB4wCQyhNq7HIbwQ4lXxu8qhLTdo=; b=x8T3swSR2HVwlyEipNAMYM5OJnls7s0D7c4e34JoWqqaLZ6tkja7DWTeyOWzPjvil0putu WbAQ7JL8NpleJomAFTCG4GCfOWelctA+A8jJmcZCkGQJnFK5EEt3cgPaqhkbovK/+E4Vf2 ybp4JJyj3S89g0nfAmEdtwrb0WIpd0RDjsxujGTbX8BA9jEr2CxvphtvpNHqXFsC14MLpx vpX9S7SssDstc91/DU9z47xskIYMXF94wmfiEqRKi+xhtCjoN8E5jLUdUVpyVGxzb8Ghjr Lr4iBNK2ExE+TKFqLYTgO7Vp/rHoLULRBteGsJrEbur01gKILx+/vSGwWTOj5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691418258; a=rsa-sha256; cv=none; b=DWo4+4JnomkN4E/yFrSYj5/k7ZrciAn77HoGLydow1APtw9zkdQKOcQIF2vi974y7a5IWL jP0ikjTwpl/MGfR3u4ilcqpFHRyxc4AB81rj93TJ6NICiYkkYfxMSHc1cIvo1rlawNivC2 ivWXumlI4v8m0HMn5OaSJYhSPujJWr8Vh3ZYnhPYent1JMfbp0wNTstPSbwT2/bRuP9/7R BGLaAYZo7pBGCwfc9MqFzdtQToyNiT/Pt8QuX8phqJdvJTxMRXIeMb7z9Uh0qscnOK05ZF fsCygXGettz/0PJafCYEdugdMQrz7+XPdd/G1oaE4ua41sSOMCMYSwwJvE0bNQ== 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 4RKJVB5X7szwFf; Mon, 7 Aug 2023 14:24: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 377EOI3B025891; Mon, 7 Aug 2023 14:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 377EOIQe025890; Mon, 7 Aug 2023 14:24:18 GMT (envelope-from git) Date: Mon, 7 Aug 2023 14:24:18 GMT Message-Id: <202308071424.377EOIQe025890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: b4ebdfe9980f - stable/13 - linux(4): Use M_LINUX for malloc type in getdents64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c Auto-Submitted: auto-generated The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c commit b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c Author: Dmitry Chagin AuthorDate: 2023-07-18 21:44:16 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-07 14:22:59 +0000 linux(4): Use M_LINUX for malloc type in getdents64 MFC after: 2 weeks (cherry picked from commit e27e3fa71c8f31304efa5e065876a34ee603a388) --- sys/compat/linux/linux_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index da492ec4c4cb..573c4c8a2eae 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -532,7 +532,7 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) size_t retval; buflen = min(args->count, MAXBSIZE); - buf = malloc(buflen, M_TEMP, M_WAITOK); + buf = malloc(buflen, M_LINUX, M_WAITOK); error = kern_getdirentries(td, args->fd, buf, buflen, &base, NULL, UIO_SYSSPACE); @@ -541,7 +541,7 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) goto out1; } - linux_dirent64 = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_TEMP, + linux_dirent64 = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_LINUX, M_WAITOK | M_ZERO); len = td->td_retval[0]; @@ -584,9 +584,9 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) td->td_retval[0] = retval; out: - free(linux_dirent64, M_TEMP); + free(linux_dirent64, M_LINUX); out1: - free(buf, M_TEMP); + free(buf, M_LINUX); return (error); }