Re: [PATCH] Print number of oopses in Sysrq-P output

From: Erik Mouw
Date: Thu Jan 18 2007 - 12:46:51 EST


On Thu, Jan 18, 2007 at 08:05:22PM +0300, Alexey Dobriyan wrote:
> From: Pavel Emelianov <xemul@xxxxxxxxxx>
>
> Useful in deciding whether said output should be ignored
> in absence of other info. :)
>
> Signed-off-by: Pavel Emelianov <xemul@xxxxxxxxxx>
> Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxxx>
> ---
>
> arch/i386/kernel/process.c | 4 +++-
> arch/i386/kernel/traps.c | 2 +-
> arch/x86_64/kernel/process.c | 6 ++++--
> arch/x86_64/kernel/traps.c | 3 ++-
> 4 files changed, 10 insertions(+), 5 deletions(-)

What about the other architectures?

> --- a/arch/i386/kernel/traps.c
> +++ b/arch/i386/kernel/traps.c
> @@ -366,6 +366,7 @@ int is_valid_bugaddr(unsigned long eip)
> return ud2 == 0x0b0f;
> }
>
> +int die_counter = 0;

Global variables don't have to be initialised at 0. They live in the
.bss segment so they will automatically initialised at 0 and not take
space in the kernel image.


Erik

--
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
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/