question about oops and panic

sandeep kumar coolsandyforyou at gmail.com
Mon Aug 29 07:14:04 EDT 2011


Hmm...there is a very subtle difference, ofcourse...

Oops you will get, when you do a NULL pointer dereference (an exception may
be software???)..
Suppose when you try to insert a dynamic module(insmod xyz.ko), which refers
to a NULL pointer,
while installing that module, you will get oops. And you cant remove that
module.(rmmod xyz.ko wont be successful)
Only way you can do rmmod is, to restart the kernel to set things right.

Panic is the severe condition, where kernel couldnot proceed its execution
furthur.
It can be hardware specific also.
for eg:
When you try to set a physical parameter of the hardware, which it could not
capable of..
suppose setting a frequency limit of on clock, which it doesnot support..and

some action done manipulating certain CPU specific control registers which
might cause abnormal
behaviour...etc..,


In these conditions the kernel has no other go but stop its execution..then
it will call the panic handler(panic("string"))..

Hope this makes a little more sense & You can grep for the panic() calls in
the kernel source code, which might give you better insight..

On Mon, Aug 29, 2011 at 4:21 PM, anish singh <anish198519851985 at gmail.com>wrote:

> On Mon, Aug 29, 2011 at 2:19 AM, Parmenides <mobile.parmenides at gmail.com>
> wrote:
> > Hi,
> >
> > 1. I think oops and panic are both some way to deal with errors occurs
> > in kernel space. Is there any relationship between them?
> AFAIK both are same.
> >
> > 2. I make a NULL pointer reference deliberately in a kernel module and
> > get an oops like:
> >
> > ... ... ...
> >
> > Aug 29 00:58:45 lfs kernel: Call Trace:
> > Aug 29 00:58:45 lfs kernel:  [<c100112d>] ? do_one_initcall+0x44/0x120
> > Aug 29 00:58:45 lfs kernel:  [<c10517ce>] ? sys_init_module+0xa7/0x1d9
> > Aug 29 00:58:45 lfs kernel:  [<c138d49d>] ? syscall_call+0x7/0xb
> >
> > ... ... ...
> >
> > I wonder what is the meaning of the tow numbers after a function name.
> They are offsets in the function name from which next function in the call
> stack is called right ?
>  >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
With regards,
Sandeep Kumar Anantapalli,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110829/a50f27f2/attachment-0001.html 


More information about the Kernelnewbies mailing list