Skip to content

Commit

Permalink
x86, pat: In rbt_memtype_check_insert(), update new->type only if valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pallipadi, Venkatesh authored and H. Peter Anvin committed Mar 1, 2010
1 parent 9e41a49 commit 4daa2a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/mm/pat_rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4daa2a8

Please sign in to comment.