Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2012 01:40:08 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/156540: commit references a PR
Message-ID:  <201201280140.q0S1e8iW007672@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/156540; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/156540: commit references a PR
Date: Sat, 28 Jan 2012 01:39:03 +0000 (UTC)

 Author: emaste
 Date: Sat Jan 28 01:38:48 2012
 New Revision: 230636
 URL: http://svn.freebsd.org/changeset/base/230636
 
 Log:
   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:
   head/sys/dev/hwpmc/hwpmc_x86.c
 
 Modified: head/sys/dev/hwpmc/hwpmc_x86.c
 ==============================================================================
 --- head/sys/dev/hwpmc/hwpmc_x86.c	Sat Jan 28 00:17:17 2012	(r230635)
 +++ head/sys/dev/hwpmc/hwpmc_x86.c	Sat Jan 28 01:38:48 2012	(r230636)
 @@ -250,7 +250,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 = 1; i < md->pmd_nclass; i++)
  			md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT;
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



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