From: "tip-bot for Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
steiner@sgi.com, venkatesh.pallipadi@intel.com,
tglx@linutronix.de
Subject: [tip:x86/pat] x86, pat: In rbt_memtype_check_insert(), update new->type only if valid
Date: Mon, 1 Mar 2010 23:21:39 GMT [thread overview]
Message-ID: <tip-4daa2a8093ecd1148270a1fc64e99f072b8c2901@git.kernel.org> (raw)
In-Reply-To: <20100224214355.GA16431@linux-os.sc.intel.com>
Commit-ID: 4daa2a8093ecd1148270a1fc64e99f072b8c2901
Gitweb: http://git.kernel.org/tip/4daa2a8093ecd1148270a1fc64e99f072b8c2901
Author: Pallipadi, Venkatesh <venkatesh.pallipadi@intel.com>
AuthorDate: Wed, 24 Feb 2010 13:43:55 -0800
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Mon, 1 Mar 2010 14:28:48 -0800
x86, pat: In rbt_memtype_check_insert(), update new->type only if valid
new->type should only change when there is a valid ret_type. Otherwise
the requested type and return type should be same.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
LKML-Reference: <20100224214355.GA16431@linux-os.sc.intel.com>
Tested-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.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 9063f40..07de4cb 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;
prev parent reply other threads:[~2010-03-01 23:25 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
2010-03-01 15:11 ` Jack Steiner
2010-03-01 17:55 ` Pallipadi, Venkatesh
2010-03-01 23:21 ` tip-bot for Pallipadi, Venkatesh [this message]
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=tip-4daa2a8093ecd1148270a1fc64e99f072b8c2901@git.kernel.org \
--to=venkatesh.pallipadi@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome