kern/156540: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Mon Aug 20 15:00:38 UTC 2012

The following reply was made to PR kern/156540; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at
Subject: Re: kern/156540: commit references a PR
Date: Mon, 20 Aug 2012 14:54:42 +0000 (UTC)

 Author: emaste
 Date: Mon Aug 20 14:54:30 2012
 New Revision: 239433
   MFC r230636:
     pmc_*_initialize may return NULL if the CPU is not supported, so check
     that md is not null before dereferencing it.
   PR:             kern/156540
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/dev/   (props changed)
 Modified: stable/9/sys/dev/hwpmc/hwpmc_x86.c
 --- stable/9/sys/dev/hwpmc/hwpmc_x86.c	Mon Aug 20 14:52:43 2012	(r239432)
 +++ stable/9/sys/dev/hwpmc/hwpmc_x86.c	Mon Aug 20 14:54:30 2012	(r239433)
 @@ -252,7 +252,7 @@ pmc_md_initialize()
  		return (NULL);
  	/* disallow sampling if we do not have an LAPIC */
 -	if (!lapic_enable_pmc())
 +	if (md != NULL && !lapic_enable_pmc())
  		for (i = 0; i < md->pmd_nclass; i++) {
  			if (i == PMC_CLASS_INDEX_SOFT)
 svn-src-all at mailing list
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at"

More information about the freebsd-bugs mailing list