Skip to contentSkip to conversation

vmalloc.c patch for 2.4.20-pre8-ac3

PATCH In review Art Haas 2 participants 2 messages Oct 1, 2002

Subsystems (2)
lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 vmalloc.c patch for 2.4.20-pre8-ac3

Hi.

It looks like the small vmalloc.c patch didn't make it into 2.4.20-pre8-ac3. The patch is needed because the wrong variable is passed to kfree().

Art Haas

mm/vmalloc.c renamed from mm/vmalloc.c.ac3 +1 -1
@@ -179,7 +179,7 @@
 
 	size += PAGE_SIZE;
 	if (!size) {
-		kfree (addr);
+		kfree (area);
 		return NULL;
 	}
 
Signature · 3 lines
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759
#1 lore raw

mm/vmalloc.c line 184

Quoted 10 lines · Art Haas
mm/vmalloc.c renamed from mm/vmalloc.c.ac3 +1 -1
@@ -179,7 +179,7 @@
 
 	size += PAGE_SIZE;
 	if (!size) {
-		kfree (addr);
+		kfree (area);
 		return NULL;
 	}

Ick, that's my bad. Fix is correct, though davem suggested testing for -PAGE_SIZE before we do the kmalloc would be cleaner. I tend to agree, but didn't get around to doing it.

Dave

Signature · 1 line
| Dave Jones.        http://www.codemonkey.org.uk