---
 mm/allocpercpu.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6/mm/allocpercpu.c
===================================================================
--- linux-2.6.orig/mm/allocpercpu.c	2007-10-30 20:52:42.000000000 -0700
+++ linux-2.6/mm/allocpercpu.c	2007-10-30 21:00:03.000000000 -0700
@@ -31,20 +31,20 @@ static inline void set_map(int start, in
 {
 	cpu_alloc_map[start + length - 1] = END;
 	if (length > 1)
-		memset(cpu_alloc_map + start + 1, USED, length - 1);
+		memset(cpu_alloc_map + start, USED, length - 1);
 }
 
 static inline int clear_map(int start)
 {
 	int units = 0;
 
-	while (cpu_alloc_map[start] == USED) {
-		cpu_alloc_map[start++] = FREE;
+	while (cpu_alloc_map[start + units] == USED) {
+		cpu_alloc_map[start + units] = FREE;
 		units++;
 	}
 	BUG_ON(cpu_alloc_map[start] != END);
 	cpu_alloc_map[start] = FREE;
-	return units;
+	return units + 1;
 }
 
 static inline void zero_per_cpu(void *x, unsigned long size)