From: Vladimir Serbinenko Date: Mon, 28 Oct 2013 13:30:29 +0000 (+0100) Subject: * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least X-Git-Tag: grub-2.02-beta1~538 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=81afc5cce68798c23ee6e123701b0d3b52f7378e;p=thirdparty%2Fgrub.git * grub-core/loader/i386/linux.c (allocate_pages): Allocate at least a page in protected space. --- 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. */