From 6fa292bbd888d9e32ec1e241b4d87a625b51acff Mon Sep 17 00:00:00 2001 From: Greg Edwards Date: Wed, 18 Aug 2004 17:26:05 +0000 Subject: [PATCH] [IA64] ia32_support.c: Check whether page_alloc failed. It's pretty unlikely these page allocations would fail, but we should still check them. Signed-off-by: Greg Edwards Signed-off-by: Tony Luck --- arch/ia64/ia32/ia32_support.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index 4b43f1753c0f5..a7285b89c8413 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c @@ -145,6 +145,9 @@ ia32_gdt_init (void) int cpu = smp_processor_id(); ia32_shared_page[cpu] = alloc_page(GFP_KERNEL); + if (!ia32_shared_page[cpu]) + panic("failed to allocate ia32_shared_page[%d]\n", cpu); + cpu_gdt_table[cpu] = page_address(ia32_shared_page[cpu]); /* Copy from the boot cpu's GDT */ @@ -161,6 +164,9 @@ ia32_boot_gdt_init (void) unsigned long ldt_size; ia32_shared_page[0] = alloc_page(GFP_KERNEL); + if (!ia32_shared_page[0]) + panic("failed to allocate ia32_shared_page[0]\n"); + ia32_boot_gdt = page_address(ia32_shared_page[0]); cpu_gdt_table[0] = ia32_boot_gdt; -- 2.53.0