Patchwork panic.c: export panic_on_oops

login
register
mail settings
Submitter Artem Bityutskiy
Date Oct. 11, 2009, 6:10 a.m.
Message ID <1255241458-11665-1-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/35687/
State New
Headers show

Comments

Artem Bityutskiy - Oct. 11, 2009, 6:10 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

We use the mtdoops module which stores oopses on the Flash partition,
in order to make it possible to analyze them later. And mtdoops needs
to know whether 'panic_on_oops' is on or off. Thus, we need this
variable to be exported.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Simon Kagstrom <simon.kagstrom@netinsight.net>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>
---
 kernel/panic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Ingo Molnar - Oct. 12, 2009, 11:15 a.m.
* Artem Bityutskiy <dedekind1@gmail.com> wrote:

> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> 
> We use the mtdoops module which stores oopses on the Flash partition,
> in order to make it possible to analyze them later. And mtdoops needs
> to know whether 'panic_on_oops' is on or off. Thus, we need this
> variable to be exported.

hm, why does it need it? Could you send the patch please that makes use 
of it (as an easy way to explain the need for the export) - current 
upstream drivers/mtd/mtdoops.c doesnt need it so it must be some pending 
change.

	Ingo
Simon Kagstrom - Oct. 12, 2009, 11:23 a.m.
On Mon, 12 Oct 2009 13:15:45 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> * Artem Bityutskiy <dedekind1@gmail.com> wrote:
>
> > We use the mtdoops module which stores oopses on the Flash partition,
> > in order to make it possible to analyze them later. And mtdoops needs
> > to know whether 'panic_on_oops' is on or off. Thus, we need this
> > variable to be exported.
> 
> hm, why does it need it? Could you send the patch please that makes use 
> of it (as an easy way to explain the need for the export) - current 
> upstream drivers/mtd/mtdoops.c doesnt need it so it must be some pending 
> change.

You have the patch that requires it here:

  http://patchwork.ozlabs.org/patch/34732/

it's a fix to allow mtdoops to actually store oopses which happen when
panic_on_oops is set (before these would be missed as the write would
never be done).

// Simon

Patch

diff --git a/kernel/panic.c b/kernel/panic.c
index bcdef26..6d29be3 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -24,6 +24,8 @@ 
 #include <linux/dmi.h>
 
 int panic_on_oops;
+EXPORT_SYMBOL_GPL(panic_on_oops);
+
 static unsigned long tainted_mask;
 static int pause_on_oops;
 static int pause_on_oops_flag;