Date: Sun, 1 Sep 2013 21:44:43 +0000 (UTC) From: Davide Italiano <davide@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255133 - head/sys/dev/hwpmc Message-ID: <201309012144.r81Lih3w008247@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davide Date: Sun Sep 1 21:44:43 2013 New Revision: 255133 URL: http://svnweb.freebsd.org/changeset/base/255133 Log: Complete r250105. Do not zero fields if M_ZERO flag is specified to malloc(9). Reported by: pluknet, glebius Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sun Sep 1 20:48:22 2013 (r255132) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sun Sep 1 21:44:43 2013 (r255133) @@ -2026,11 +2026,7 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); - po->po_sscount = po->po_error = po->po_flags = po->po_logprocmaps = 0; - po->po_file = NULL; po->po_owner = p; - po->po_kthread = NULL; - LIST_INIT(&po->po_pmcs); LIST_INSERT_HEAD(poh, po, po_next); /* insert into hash table */ TAILQ_INIT(&po->po_logbuffers); @@ -2156,8 +2152,6 @@ pmc_allocate_pmc_descriptor(void) struct pmc *pmc; pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); - pmc->pm_owner = NULL; - LIST_INIT(&pmc->pm_targets); PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309012144.r81Lih3w008247>