Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2023 21:45:01 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b834497c6d0c - main - linux(4): Use M_LINUX for malloc type of proc emuldata
Message-ID:  <202307182145.36ILj1xL061929@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=b834497c6d0cccaeebad8d94a32c8dd3ec0d3f9b

commit b834497c6d0cccaeebad8d94a32c8dd3ec0d3f9b
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-07-18 21:44:17 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-07-18 21:44:17 +0000

    linux(4): Use M_LINUX for malloc type of proc emuldata
    
    MFC after:              2 weeks
---
 sys/compat/linux/linux_emul.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c
index 6a2ea1f26fe5..8384d6a42962 100644
--- a/sys/compat/linux/linux_emul.c
+++ b/sys/compat/linux/linux_emul.c
@@ -147,7 +147,7 @@ linux_proc_init(struct thread *td, struct thread *newtd, bool init_thread)
 		p = newtd->td_proc;
 
 		/* non-exec call */
-		em = malloc(sizeof(*em), M_TEMP, M_WAITOK | M_ZERO);
+		em = malloc(sizeof(*em), M_LINUX, M_WAITOK | M_ZERO);
 		if (init_thread) {
 			LINUX_CTR1(proc_init, "thread newtd(%d)",
 			    newtd->td_tid);
@@ -250,7 +250,7 @@ linux_common_execve(struct thread *td, struct image_args *eargs)
 		p->p_emuldata = NULL;
 		PROC_UNLOCK(p);
 
-		free(em, M_TEMP);
+		free(em, M_LINUX);
 		free(pem, M_LINUX);
 	}
 	return (EJUSTRETURN);
@@ -328,7 +328,7 @@ linux_thread_dtor(struct thread *td)
 
 	LINUX_CTR1(thread_dtor, "thread(%d)", em->em_tid);
 
-	free(em, M_TEMP);
+	free(em, M_LINUX);
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307182145.36ILj1xL061929>