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 FreeBSD.org
Cc:  
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
 URL: http://svn.freebsd.org/changeset/base/239433
 
 Log:
   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
 
 Modified:
   stable/9/sys/dev/hwpmc/hwpmc_x86.c
 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)
  				continue;
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list