public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Panic in reserve_memtype()
Date: Wed, 24 Feb 2010 16:05:18 -0600	[thread overview]
Message-ID: <20100224220518.GA31766@sgi.com> (raw)
In-Reply-To: <20100224214355.GA16431@linux-os.sc.intel.com>

> 
> I guess I found an obvious problem in the code. Can you check whether the
> below patch resolves the panic you are seeing.
> 
> Thanks,
> Venki


Works great!! Thanks...


> 
> 
> new->type should only change when there is a valid ret_type. Otherwise
> requested type and return type should be same.
> 
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> ---
>  arch/x86/mm/pat_rbtree.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
> index e4cd229..58b6de1 100644
> --- a/arch/x86/mm/pat_rbtree.c
> +++ b/arch/x86/mm/pat_rbtree.c
> @@ -223,7 +223,9 @@ int rbt_memtype_check_insert(struct memtype *new, unsigned long *ret_type)
>  						new->type, ret_type);
>  
>  	if (!err) {
> -		new->type = *ret_type;
> +		if (ret_type)
> +			new->type = *ret_type;
> +
>  		memtype_rb_insert(&memtype_rbroot, new);
>  	}
>  	return err;
> -- 
> 1.6.0.6

  reply	other threads:[~2010-02-24 22:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 20:22 Panic in reserve_memtype() Jack Steiner
2010-02-24 21:09 ` Pallipadi, Venkatesh
2010-02-24 21:37   ` Jack Steiner
2010-02-24 21:43     ` Pallipadi, Venkatesh
2010-02-24 22:05       ` Jack Steiner [this message]
2010-03-01 15:11         ` Jack Steiner
2010-03-01 17:55           ` Pallipadi, Venkatesh
2010-03-01 23:21       ` [tip:x86/pat] x86, pat: In rbt_memtype_check_insert(), update new->type only if valid tip-bot for Pallipadi, Venkatesh

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=20100224220518.GA31766@sgi.com \
    --to=steiner@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox