[Top] [All Lists]

Re: [PATCH] Add support for profiling Loongson 2E

To: Dajie Tan <>
Subject: Re: [PATCH] Add support for profiling Loongson 2E
From: Ralf Baechle <>
Date: Thu, 26 Jul 2007 12:17:03 +0100
Cc: John Levon <>, linux-mips <>,,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
User-agent: Mutt/1.5.14 (2007-02-12)
On Thu, Jul 26, 2007 at 05:14:14AM +0400, Dajie Tan wrote:

> >> Yeah,this change is to enhance the robust of oprofile. When using
> >> performace counter manually(writting control register in a module, no
> >> need to use the oprofile),I usually make kernel panic if I do not
> >> initialize the oprofile and enable the overflow interrupt carelessly.
> >> So, this change can avoid this panic. :D
> >
> >This panic is good and should stay. It shows that you've made a mistake.
> >
> >john
> >
> This panic is caused by accessing a null pointer.Do you think that
> accessing a null
> pointer is allowed in a robust system ?

Of course it isn't.  From the perspective of us kernel maintainers patches
that add such checks are a red flag which raise concerns about the
correctness of the caller of the function.  So if a patch like this is
submitted the first thing that is likely to happen is that we will ask
why the check is needed.  It does not mean such a patch is fundamentally
a no-no but the code will be looked at a little harder.


<Prev in Thread] Current Thread [Next in Thread>