svn commit: r255133 - head/sys/dev/hwpmc

Davide Italiano davide at FreeBSD.org
Sun Sep 1 21:44:44 UTC 2013


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);
 


More information about the svn-src-head mailing list