Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2018 18:54:34 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r340501 - stable/12/sys/kern
Message-ID:  <201811171854.wAHIsY0Z015634@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sat Nov 17 18:54:34 2018
New Revision: 340501
URL: https://svnweb.freebsd.org/changeset/base/340501

Log:
  MFC r339820:
  Use M_WAITOK in init_hwpmc().

Modified:
  stable/12/sys/kern/kern_pmc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_pmc.c
==============================================================================
--- stable/12/sys/kern/kern_pmc.c	Sat Nov 17 18:53:28 2018	(r340500)
+++ stable/12/sys/kern/kern_pmc.c	Sat Nov 17 18:54:34 2018	(r340501)
@@ -345,9 +345,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 < vm_ndomains; domain++) {
 		pmc_dom_hdrs[domain] = malloc_domainset(



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