From 81afc5cce68798c23ee6e123701b0d3b52f7378e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 28 Oct 2013 14:30:29 +0100 Subject: [PATCH] * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least a page in protected space. --- ChangeLog | 5 +++++ grub-core/loader/i386/linux.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7319fb8cf..f2e8dd9ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-28 Vladimir Serbinenko + + * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least + a page in protected space. + 2013-10-28 Vladimir Serbinenko * grub-core/loader/multiboot.c (grub_cmd_module): Don't attempt to diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c index 18b7b0fa1..7b63e2579 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -198,6 +198,9 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align, { grub_err_t err; + if (prot_size == 0) + prot_size = 1; + prot_size = page_align (prot_size); /* Initialize the memory pointers with NULL for convenience. */