From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Woodhouse <dwmw2@infradead.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 16:48:19 +1000 [thread overview]
Message-ID: <1249541299.18245.74.camel@pasglop> (raw)
In-Reply-To: <1249540910.23206.67.camel@macbook.infradead.org>
On Thu, 2009-08-06 at 07:41 +0100, David Woodhouse wrote:
> 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.
.... today :-)
> Of course, adding the check probably makes sense anyway.
Yup, better safe.
Cheers,
Ben.
next prev parent reply other threads:[~2009-08-06 6:48 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
2009-08-06 6:48 ` Benjamin Herrenschmidt [this message]
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=1249541299.18245.74.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=dwmw2@infradead.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).