Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: I get panic rather than oops | Date | 24 Nov 1999 11:15:32 +0100 |
| |
In article <cistron.19991124075753.12004.qmail@mail.ocs.com.au>, Keith Owens <kaos@ocs.com.au> wrote: >On Wed, 24 Nov 1999 12:27:08 +0530, >Raju K V <rajukv@wipinfo.soft.net> wrote: >>What is the simplest method for generating an Oops? Browsing thru the >>kernel mailing list archive, I came across a thread saying >> *(int *)0=0; >>generates on Oops. I wrote a program with this line in init_module. >>compiled it as a module. On doing insmod, I got a panic. Is there a way >>by which I can get it generate Oops rather than panic? > >The panic is because the code is in kernel mode. Try this instead.
Can't you simply call BUG() ? Should log filename and line number and generate a nice oops for you.
Mike. -- First things first, but not necessarily in that order.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |