List Info

Thread: fix an IA64 MCA kdump bug in kdump_init_notifier




fix an IA64 MCA kdump bug in kdump_init_notifier
country flaguser name
United States
2007-03-19 21:12:44
In my original patch to support MCA in kdump, changes were
made to
kdump_init_notifier() of arch/ia64/kernel/crash.c. But one
change
was somehow incorrectly modified in 2.6.20 to as below:

>        if ((val == DIE_INIT_MONARCH_ENTER ||
DIE_INIT_SLAVE_ENTER) &&
>                 nd->sos->rv_rc == 1)
>                return NOTIFY_DONE;

Since DIE_INIT_SLAVE_ENTER is a non-zero value, thus
"nd->sos->rv_rc
==1" is always evaluated. The kdump kernel aborted
because nd->sos
is NULL in (at least some) MCA cases.

This patch corrects the problem. It was created against
2.6.21-rc4.

Signed-Off-By: Jay Lan <jlansgi.com>


  
Re: fix an IA64 MCA kdump bug in kdump_init_notifier
country flaguser name
Japan
2007-03-19 21:34:28
On Mon, Mar 19, 2007 at 07:12:44PM -0700, Jay Lan wrote:
> In my original patch to support MCA in kdump, changes
were made to
> kdump_init_notifier() of arch/ia64/kernel/crash.c. But
one change
> was somehow incorrectly modified in 2.6.20 to as
below:
> 
> >        if ((val == DIE_INIT_MONARCH_ENTER ||
DIE_INIT_SLAVE_ENTER) &&
> >                 nd->sos->rv_rc == 1)
> >                return NOTIFY_DONE;
> 
> Since DIE_INIT_SLAVE_ENTER is a non-zero value, thus
"nd->sos->rv_rc
> ==1" is always evaluated. The kdump kernel aborted
because nd->sos
> is NULL in (at least some) MCA cases.
> 
> This patch corrects the problem. It was created against
2.6.21-rc4.

Hi Jay,

I think that your fix below does correct a problem,
in that "|| DIE_INIT_SLAVE_ENTER" appears to be
quite bogus.
But if you are worried about nd->sos being NULL, is it
worth checking
for that explicitly. Or will it always be non-NULL with the
code below?

> 
> Signed-Off-By: Jay Lan <jlansgi.com>
> 

> Index: linux/arch/ia64/kernel/crash.c
>
============================================================
=======
> --- linux.orig/arch/ia64/kernel/crash.c	2007-03-15
17:20:01.000000000 -0700
> +++ linux/arch/ia64/kernel/crash.c	2007-03-19
17:27:42.102401208 -0700
>  -164,7 +164,7  kdump_init_notifier(struct notifier_bloc
>  
>  	nd = (struct ia64_mca_notify_die *)args->err;
>  	/* Reason code 1 means machine check rendezous*/
> -	if ((val == DIE_INIT_MONARCH_ENTER ||
DIE_INIT_SLAVE_ENTER) &&
> +	if ((val == DIE_INIT_MONARCH_ENTER || val ==
DIE_INIT_SLAVE_ENTER) &&
>  		 nd->sos->rv_rc == 1)
>  		return NOTIFY_DONE;
>  


-- 
Horms
  H: http://www.vergenet.n
et/~horms/
  W: http://www.valinux.co.jp
/en/

-
To unsubscribe from this list: send the line
"unsubscribe linux-ia64" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )