diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-19 14:42:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-14 09:44:08 -0800 |
commit | 171075a35117b9eeacc3251816fda5572486c6cf (patch) | |
tree | 34d6f64d64717248419fdaf75caccd44bd6e2c39 | |
parent | 8fb9f8d889b104a9acebaff83b637bcc56706576 (diff) | |
download | lwn-171075a35117b9eeacc3251816fda5572486c6cf.tar.gz lwn-171075a35117b9eeacc3251816fda5572486c6cf.zip |
AMD IOMMU: allocate rlookup_table with __GFP_ZERO
Upstream commit 83fd5cc6481c6b7fa8b45f8a7e0aa7120213430b
This is pointer list and if we dereference an uninitialized pointer
later this results in a kernel crash at boot. Happens typically after
3-5 hours of rebooting.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 1226ec6e080c..923e6827b1a7 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c @@ -930,7 +930,8 @@ int __init amd_iommu_init(void) goto free; /* IOMMU rlookup table - find the IOMMU for a specific device */ - amd_iommu_rlookup_table = (void *)__get_free_pages(GFP_KERNEL, + amd_iommu_rlookup_table = (void *)__get_free_pages( + GFP_KERNEL | __GFP_ZERO, get_order(rlookup_table_size)); if (amd_iommu_rlookup_table == NULL) goto free; |