WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Correct fseg allocation for SMBIOS tables.

To: seabios@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Correct fseg allocation for SMBIOS tables.
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 14 Jun 2011 15:22:09 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 14 Jun 2011 07:22:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Anthony Perard noticed that grub was unhappy because it sees no low memory and
that his e820 table was missing the first entry. He then pointed out this
rather glaring error in the allocation of space for the SMBIOS tables.

I've no idea why I didn't see this failure.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Tested-by: Anthony Perard <anthony.perard@xxxxxxxxxx>
---
 src/biostables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/biostables.c b/src/biostables.c
index 761b260..d8b5067 100644
--- a/src/biostables.c
+++ b/src/biostables.c
@@ -95,7 +95,7 @@ copy_smbios(void *pos)
         return;
     if (checksum(pos+0x10, p->length-0x10) != 0)
         return;
-    struct smbios_entry_point *newpos = malloc_fseg(sizeof(p->length));
+    struct smbios_entry_point *newpos = malloc_fseg(p->length);
     if (!newpos) {
         warn_noalloc();
         return;
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>