lkml.org 
[lkml]   [2001]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to provoke kernel panic
Date
On Wed, 21 Mar 2001 10:43:25 +0100, 
"Antwerpen, Oliver" <Antwerpen@netsquare.org> wrote:
>Could someone kindly tell me how to provoke a kernel panic? I need to do so
>for testing some applications regarding system crash awareness.

Create fs/example-module.c

#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>

int init_module(void)
{
printk("module loading\n");
panic("test panic\n");
return 0;
}

Add "obj-m += example-module.o" to fs/Makefile.
make modules, insmod fs/example-module.o and watch the bits fly.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.036 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site