Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2018 18:48:49 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339820 - head/sys/kern
Message-ID:  <201810271848.w9RImnGa072039@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Oct 27 18:48:49 2018
New Revision: 339820
URL: https://svnweb.freebsd.org/changeset/base/339820

Log:
  Use M_WAITOK in init_hwpmc().
  
  No functional change intended.
  
  MFC after:	2 weeks

Modified:
  head/sys/kern/kern_pmc.c

Modified: head/sys/kern/kern_pmc.c
==============================================================================
--- head/sys/kern/kern_pmc.c	Sat Oct 27 17:49:46 2018	(r339819)
+++ head/sys/kern/kern_pmc.c	Sat Oct 27 18:48:49 2018	(r339820)
@@ -360,9 +360,8 @@ init_hwpmc(void *dummy __unused)
 		    "range.\n", pmc_softevents);
 		pmc_softevents = PMC_EV_DYN_COUNT;
 	}
-	pmc_softs = malloc(pmc_softevents * sizeof(struct pmc_soft *), M_PMCHOOKS, M_NOWAIT|M_ZERO);
-	KASSERT(pmc_softs != NULL, ("cannot allocate soft events table"));
-
+	pmc_softs = malloc(pmc_softevents * sizeof(*pmc_softs), M_PMCHOOKS,
+	    M_WAITOK | M_ZERO);
 	for (domain = 0; domain < NDOMAINS; domain++) {
 		pmc_dom_hdrs[domain] = malloc_domain(sizeof(struct pmc_domain_buffer_header), M_PMC, domain,
 										M_WAITOK|M_ZERO);



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