From nobody Tue Jul 18 21:44:56 2023 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 4R5CCr6MSYz4dTZJ; Tue, 18 Jul 2023 21:44:56 +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 4R5CCr5k6nz424x; Tue, 18 Jul 2023 21:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689716696; 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=QnRNyxTElgh989GBLMDaCF+cjsCBj50QcCyWz+5gZz0=; b=yq4PzcNggAx81/tj9N/+aBM/ckNTcuXtucQ3cEuqEIugtGLW8/Z6CDbEiLIHfXliqfCFWj vv1MK3zc/25vHMljiQ90Q6ZatImddUGH9FVApvNaiPaRNGKKl/VCnhtQ5zy3nDSlY72pyr D5iD28JRsrNe+kQyaOLCOSoSeijYzgqnJyO0TuoBh79UN4gMXGAQIsm+KwSqLBvlpGk6g1 OqMeGU+LHTGnLEtN6IY+D3YzjqLV89NoQZHt4rhYqNNIrFskpE3QhGVj8zJUMe7GQuCg0K ER5Cu390OV+RaZsbLJ1LBeOexDHFwKd74ck/ll7nSruqwQuIY18XFZzWsCYODQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689716696; 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=QnRNyxTElgh989GBLMDaCF+cjsCBj50QcCyWz+5gZz0=; b=tC90M7W/ZLwr0AhBoIhUxV6HC/URHBKTKD9Uofes80bH4WLjq72M8rXKQzGGoEOodg3HHm QxSbrv4AjSZfxXNllGc8NHzxnxXhUl52Mu51HGDOcDiADzqFwgMVP4hanpbwLGKYSIMXxn eLxtLDcXgWzTzrTJBlkrNy0HsBvtyHBNYUXnzrNgdwrORsgr3aLe9uIaNaLNqG4WxT/n0J tJcH9gLOzcA7XCPtwoHuGMGzqJD4JXfkswyXdEzB2V8ndKHRv8MEgf3eHx9KUs++NsVuHn pNPFeuk56TAmITqiD1hHK9KA8ckd4ajUa2MC1LM82PSLbZA9FJ/qp3mJHcCMHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689716696; a=rsa-sha256; cv=none; b=E6XPc9N8/wWugLG1YsZa/hNC0b8KclqaHjimL9K/TXzdfdAkxDNIAxdERZAD0gKJUhFv94 otnOuSdC6C5I6li8eXFXekzmnhokIZvX+8WXG9Xsgt2FUvr0M4m6vsXbp4MqUd51ciWJqi 6ZY9ncaOc5hmNGA0oplXmiRKEllviNqe0TTTKdNp/CIBZn340iwO2ym18Iv764FbHyQfso LnAv7ssPhrsijLR/z0UygJaLJJ6aG41oFzQVXBrYKkpmBDgSdnFqczWZ2CxQ0mqmaBDQ7t MV5YnjrJ8zitaz+qlIEVWv1ER0nLz0sIwgynGu+RbArXoqtOZsI5xAgJg7Qvaw== 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 4R5CCr4pzlzMXr; Tue, 18 Jul 2023 21:44:56 +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 36ILiumV061835; Tue, 18 Jul 2023 21:44:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36ILiuXM061834; Tue, 18 Jul 2023 21:44:56 GMT (envelope-from git) Date: Tue, 18 Jul 2023 21:44:56 GMT Message-Id: <202307182144.36ILiuXM061834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 13d049ab8dd7 - main - linux(4): Use M_LINUX for malloc type in readdir 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13d049ab8dd718d0723229d54062c91b2fc68fda Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=13d049ab8dd718d0723229d54062c91b2fc68fda commit 13d049ab8dd718d0723229d54062c91b2fc68fda Author: Dmitry Chagin AuthorDate: 2023-07-18 21:44:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-18 21:44:15 +0000 linux(4): Use M_LINUX for malloc type in readdir MFC after: 2 weeks --- 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 951ea852ae44..37a06dd81c67 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -560,7 +560,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); @@ -571,7 +571,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; @@ -586,9 +586,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) */