Skip to contentSkip to conversation

Correct fseg allocation for SMBIOS tables.

PATCH In review Ian Campbell 2 participants 2 messages Jun 14, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Correct fseg allocation for SMBIOS tables.

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.

---
 src/biostables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/biostables.c +1 -1
index 761b260..d8b5067 100644
@@ -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;
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 5 lines · Ian Campbell

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.

Thanks - I committed this.

-Kevin