Date: Sat, 9 Jan 2016 17:02:35 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293558 - stable/10/sys/compat/linux Message-ID: <201601091702.u09H2ZTD051163@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Jan 9 17:02:35 2016 New Revision: 293558 URL: https://svnweb.freebsd.org/changeset/base/293558 Log: MFC r283454: Avoid unnecessary em zeroing in non-exec path as it already zeroed by malloc with M_ZERO flag and move zeroing to the proper place in exec path. Modified: stable/10/sys/compat/linux/linux_emul.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_emul.c ============================================================================== --- stable/10/sys/compat/linux/linux_emul.c Sat Jan 9 17:01:26 2016 (r293557) +++ stable/10/sys/compat/linux/linux_emul.c Sat Jan 9 17:02:35 2016 (r293558) @@ -89,8 +89,6 @@ linux_proc_init(struct thread *td, struc if (newtd != NULL) { /* non-exec call */ em = malloc(sizeof(*em), M_TEMP, M_WAITOK | M_ZERO); - em->pdeath_signal = 0; - em->robust_futexes = NULL; if (flags & LINUX_CLONE_THREAD) { LINUX_CTR1(proc_init, "thread newtd(%d)", newtd->td_tid); @@ -117,6 +115,11 @@ linux_proc_init(struct thread *td, struc KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n")); em->em_tid = td->td_proc->p_pid; + em->flags = 0; + em->pdeath_signal = 0; + em->robust_futexes = NULL; + em->child_clear_tid = NULL; + em->child_set_tid = NULL; /* epoll should be destroyed in a case of exec. */ pem = pem_find(td->td_proc); @@ -129,8 +132,6 @@ linux_proc_init(struct thread *td, struc } } - em->child_clear_tid = NULL; - em->child_set_tid = NULL; } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091702.u09H2ZTD051163>