From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 28 01:40:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 297811065670 for ; Sat, 28 Jan 2012 01:40:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1950B8FC18 for ; Sat, 28 Jan 2012 01:40:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0S1e83r007673 for ; Sat, 28 Jan 2012 01:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0S1e8iW007672; Sat, 28 Jan 2012 01:40:08 GMT (envelope-from gnats) Date: Sat, 28 Jan 2012 01:40:08 GMT Message-Id: <201201280140.q0S1e8iW007672@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/156540: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 01:40:09 -0000 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"