linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc/perfctr: Check oprofile_cpu_type for NULL before using it
Date: Thu, 06 Aug 2009 07:41:50 +0100	[thread overview]
Message-ID: <1249540910.23206.67.camel@macbook.infradead.org> (raw)
In-Reply-To: <1249531356.18245.73.camel@pasglop>

On Thu, 2009-08-06 at 14:02 +1000, Benjamin Herrenschmidt wrote:
> If the current CPU doesn't support performance counters,
> cur_cpu_spec->oprofile_cpu_type can be NULL. The current
> perfctr modules don't test for that case and would thus
> crash.

It can't actually be NULL on a 64-bit CPU; all 64-bit CPUs in the table
have ->oprofile_cpu_type set.

Of course, adding the check probably makes sense anyway.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

  reply	other threads:[~2009-08-06  6:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  4:02 [PATCH] powerpc/perfctr: Check oprofile_cpu_type for NULL before using it Benjamin Herrenschmidt
2009-08-06  6:41 ` David Woodhouse [this message]
2009-08-06  6:48   ` Benjamin Herrenschmidt
2009-08-06 11:03 ` Michael Ellerman
2009-08-06 12:26   ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1249540910.23206.67.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).