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

Erik Mouw erik at harddisk-recovery.com
Thu Jan 18 09:46:31 PST 2007


On Thu, Jan 18, 2007 at 08:05:22PM +0300, Alexey Dobriyan wrote:
> From: Pavel Emelianov <xemul at openvz.org>
> 
> Useful in deciding whether said output should be ignored
> in absence of other info. :)
> 
> Signed-off-by: Pavel Emelianov <xemul at openvz.org>
> Signed-off-by: Alexey Dobriyan <adobriyan at openvz.org>
> ---
> 
>  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




More information about the Devel mailing list