All of lore.kernel.org
 help / color / mirror / Atom feed
From: Horms <horms@verge.net.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] fix an IA64 MCA kdump bug in kdump_init_notifier
Date: Tue, 20 Mar 2007 02:34:28 +0000	[thread overview]
Message-ID: <20070320023426.GA12955@verge.net.au> (raw)
In-Reply-To: <45FF431C.1040607@sgi.com>

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 <jlan@sgi.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.net/~horms/
  W: http://www.valinux.co.jp/en/


  reply	other threads:[~2007-03-20  2:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20  2:12 [PATCH] fix an IA64 MCA kdump bug in kdump_init_notifier Jay Lan
2007-03-20  2:34 ` Horms [this message]
2007-03-20  2:53 ` Keith Owens
2007-03-20  4:29 ` Horms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070320023426.GA12955@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.