From nobody Mon Aug 7 14:24:16 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 4RKJV85Dwlz4pj22; Mon, 7 Aug 2023 14:24:16 +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 4RKJV84n5Pz4L1W; Mon, 7 Aug 2023 14:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418256; 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=SiMK1QK7W6N3aafuDt3F5VodDS8Adf/OPpdgcLPjGec=; b=scTkQ3kXj3UkrPKmf5O23gmaquVaRyB70SPsrp1o8s4S0tEkxvvTZ9yFAv4vqPlXrn6xN5 i03FYMoehGy208YxRCN440id+Pu/MAirbFgWCT7ViCSzPR9btoOIgvMPCa+OfbmUDaimDn Mq1YTizayPxhf6pcfPe/MnRg6OUSmc654iFAG6VjY6KhtLEF2sh7m2o4w/pV7TuOEan3sR 5VYXAEUGtEMHfQEzLmMFwG5g4gF1NtWemUd+thT7p7dk83VqRVqBbb9L8jSoRI2mjqJOJp 9jp/pfKIBcMIRxVSLg5Ir3UFR00wxkK8owRWUA/GRHlEsas54MoGgoMWaSY3+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418256; 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=SiMK1QK7W6N3aafuDt3F5VodDS8Adf/OPpdgcLPjGec=; b=nIVrRyuquVr2D6m/5Z3F2xID5EOMWIGxs0vwa7dzNy5+zuyXiU9NVcOxCsldFbiiR1yyxs YJ5vU7KBW1gTF1/U49wkdFHyAZ/tkwpGPbWB2rzl5PfMsjLBQIwqBoeEjI3b3QvZPCyI4r 7Pq8k9YbfTuojZesf4MJg71+Pv55j1b3OUeLO2wSKwZDJCMMHCBKSEAPWfKo9V1/vfs1b6 9g4XV98CgUNQ4t3Aq/efkUGg2wBWqhyyvPlTXFhJuU4cMbbA/KNks318UxTaPUvBiKhhbs 5fVYBJV+3AODSTvRQxDfeaO6lzR2rXqkEITAp22FTK/JcfdlKDrv1fjGFf5DlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691418256; a=rsa-sha256; cv=none; b=a+81lrlke7o1Ha0l9V09MEC8Q+L8tbT5LbHFf3heqwQAPRReyVALr4/z4kzhDjziPH6k8g 0GuybwUJIKhgIZ5/SsFBsovIZCnE+HEA7miS7uxGNMvFBuvkALZiY6OVAuhxDFIRAHSH1e aCzNz7V+ke/Cf5sby36WW45gk1cXY+SXVCfEf8hfuMoflz0fjuNGeRhtY/MpeUwiLylQ3H 4qIjj/PUcxBSb5IPB3SlB+MnneAsh/ag4SkzL1sTeS97vWo0L2BfroOQV/0LL6MpmRv8U/ JJCkp9TuMwtrh+1tTcnhnZ14KqLQuwd+0ccE9O4V4YYDg7Zzkm8CAXbSNBmH+A== 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 4RKJV83pz3zwFd; Mon, 7 Aug 2023 14:24:16 +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 377EOGLa025849; Mon, 7 Aug 2023 14:24:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 377EOGot025848; Mon, 7 Aug 2023 14:24:16 GMT (envelope-from git) Date: Mon, 7 Aug 2023 14:24:16 GMT Message-Id: <202308071424.377EOGot025848@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: 7027716f9d8d - stable/13 - linux(4): Use M_LINUX for malloc type in readdir 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: 7027716f9d8d2877df78efa033cdb0249db44aba Auto-Submitted: auto-generated The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=7027716f9d8d2877df78efa033cdb0249db44aba commit 7027716f9d8d2877df78efa033cdb0249db44aba Author: Dmitry Chagin AuthorDate: 2023-07-18 21:44:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-07 14:22:58 +0000 linux(4): Use M_LINUX for malloc type in readdir MFC after: 2 weeks (cherry picked from commit 13d049ab8dd718d0723229d54062c91b2fc68fda) --- 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 3e1b5299cf0b..249034231c36 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -603,7 +603,7 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) int buflen, error; buflen = sizeof(*bdp); - 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); @@ -614,7 +614,7 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) if (td->td_retval[0] == 0) goto out; - linux_dirent = malloc(LINUX_RECLEN(LINUX_NAME_MAX), M_TEMP, + linux_dirent = malloc(LINUX_RECLEN(LINUX_NAME_MAX), M_LINUX, M_WAITOK | M_ZERO); bdp = (struct dirent *) buf; @@ -629,9 +629,9 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) if (error == 0) td->td_retval[0] = linuxreclen; - free(linux_dirent, M_TEMP); + free(linux_dirent, M_LINUX); out: - free(buf, M_TEMP); + free(buf, M_LINUX); return (error); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */