Date: Mon, 20 Aug 2012 15:00:37 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: kern/156540: commit references a PR Message-ID: <201208201500.q7KF0bs8032367@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: 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@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?201208201500.q7KF0bs8032367>