Re: [PATCH] panic.c: export panic_on_oops

From: Ingo Molnar
Date: Mon Oct 12 2009 - 08:34:02 EST



* Simon Kagstrom <simon.kagstrom@xxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/