diff options
author | Venkatesh Pallipadi <venki@google.com> | 2010-06-11 04:45:01 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-12 01:12:22 +0400 |
commit | 6a4f3b523779b67e7d560ed42652f8a59f2f9782 (patch) | |
tree | fc2fa0a0b76187261cf89c174f58bb1d10f68d14 /arch/x86/mm/pat.c | |
parent | 055c47272b8f5679d08ccc57efea3cb4aaeb5fc6 (diff) | |
download | linux-6a4f3b523779b67e7d560ed42652f8a59f2f9782.tar.xz |
x86, pat: Proper init of memtype subtree_max_end
subtree_max_end that was recently added to struct memtype was not getting
properly initialized resulting in
WARNING: kmemcheck: Caught 64-bit read from uninitialized memory
in memtype_rb_augment_cb()
reported here
https://bugzilla.kernel.org/show_bug.cgi?id=16092
This change fixes the problem.
Reported-by: Christian Casteyde <casteyde.christian@free.fr>
Tested-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: Venkatesh Pallipadi <venki@google.com>
LKML-Reference: <1276217101-11515-1-git-send-email-venki@google.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r-- | arch/x86/mm/pat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index acc15b23b743..64121a18b8cb 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -302,7 +302,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type, return -EINVAL; } - new = kmalloc(sizeof(struct memtype), GFP_KERNEL); + new = kzalloc(sizeof(struct memtype), GFP_KERNEL); if (!new) return -ENOMEM; |