[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-4daa2a8093ecd1148270a1fc64e99f072b8c2901@git.kernel.org>
Date: Mon, 1 Mar 2010 23:21:39 GMT
From: "tip-bot for Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
steiner@....com, venkatesh.pallipadi@...el.com, tglx@...utronix.de
Subject: [tip:x86/pat] x86, pat: In rbt_memtype_check_insert(), update new->type only if valid
Commit-ID: 4daa2a8093ecd1148270a1fc64e99f072b8c2901
Gitweb: http://git.kernel.org/tip/4daa2a8093ecd1148270a1fc64e99f072b8c2901
Author: Pallipadi, Venkatesh <venkatesh.pallipadi@...el.com>
AuthorDate: Wed, 24 Feb 2010 13:43:55 -0800
Committer: H. Peter Anvin <hpa@...or.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@...el.com>
LKML-Reference: <20100224214355.GA16431@...ux-os.sc.intel.com>
Tested-by: Jack Steiner <steiner@....com>
Signed-off-by: H. Peter Anvin <hpa@...or.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists