Re: [PATCH] panic.c: export panic_on_oops

Ingo Molnar
2009-10-12T12:32:27Z

* Simon Kagstrom <simon.kagstrom@netinsight.net> wrote:

> > Yes, that looks like the better direction - but 'panic' is still the
> > wrong trigger condition i think. We generally just crash and dont
> > panic. Often we'll display a kernel warning and then hang. Etc.
>
> But how can we detect that? The code above will write to the MTD
> device either if an oops happens, or if we panic for some reason. If
> the kernel just hangs (and is reset by the watchdog, if we have one),
> how should we know when to write the log out?

You shouldnt need to care about that in a console driver - it's up to
higher layers.

See my reply to David Woodhouse, i think we should add support for
buffering in kernel/printk.c and that would both fix your problems,
would simplify the driver (significantly!) and would expose the generic
buffering capability to other console drivers as well.

Ingo