From: Linus Torvalds (torvalds@klaava.Helsinki.FI)
Date: 04/17/93


From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Subject: Re: possible bug in mount()
Date: Sat, 17 Apr 1993 23:35:57 GMT

In article <1993Apr17.220003.3133@kf8nh.wariat.org> bsa@kf8nh.wariat.org (Brandon S. Allbery) writes:
>
>Reread the first paragraph, H.J. I don't care *how* screwed up the user-mode
>code is, the kernel should NEVER panic as a result of it.

I'd like to point out that what you saw wasn't even close to a panic -
it's just an ordinary debugging message that means that the kernel
hasn't done enough checking. In some cases, that can be problematic (if
this happens in a interrupt handler or if it happens in a place where
the kernel has busy resources), but generally a general protection is
just the equivalent of a normal SIGSEGV that happens to be in kernel
code. That was indeed the result of all this - just a sigsegv (which
was quite ok - you get sigsegvs in user mode too when you give wrong
parameters to functions) that happened to have some debug information
added to it.

The debugging messages used to occur with *every* sigsegv in older
versions of linux - I think I removed the user level debug info in 0.97
or so, as it made people nervous to see a register dump when a program
did something it shouldn't have. So now linux prints out the error
messages only when the problem is in kernel mode (and yes, it should be
considered a bug when this happens, but it's not necessarily a panic()
or even a "real" problem).

Note that most of these have been fixed a long time ago, so now only the
really bad things result in debugging info - these are usually also
things that actually *do* result in a panic sooner or later (usually
sooner), so yes, there is some correlation with the debugging info and a
panic. It's just not quite 1:1,

                Linus