2007/7/25, John Levon <levon@xxxxxxxxxxxxxxxxx>:
On Wed, Jul 25, 2007 at 07:41:21AM +0400, Dajie Tan wrote: > >Why do you need this change? It almost looks as if you're papering over > >a bug where add_sample should not be called at all. > > 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 ?