From: Greg Edwards <edwardsg@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] check page allocations in ia32 support code
Date: Wed, 11 Aug 2004 20:33:53 +0000 [thread overview]
Message-ID: <20040811203352.GA7683@sgi.com> (raw)
It's pretty unlikely these page allocations would fail, but we should
still check them.
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Greg
ia32_support.c | 6 ++++++
1 files changed, 6 insertions(+)
Index: work-26x-bk/arch/ia64/ia32/ia32_support.c
=================================--- work-26x-bk.orig/arch/ia64/ia32/ia32_support.c 2004-07-29 14:38:04.000000000 -0500
+++ work-26x-bk/arch/ia64/ia32/ia32_support.c 2004-08-11 15:17:55.000000000 -0500
@@ -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;
reply other threads:[~2004-08-11 20:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040811203352.GA7683@sgi.com \
--to=edwardsg@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox