[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1158334477.5219.1.camel@antonovi-desktop>
Date: Fri, 15 Sep 2006 11:34:37 -0400
From: Anatoli Antonovitch <antonovi@....com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH]i386: fix overflow in vmap on an x86 system which has more
than 4GB memory.
Description
(max_mapnr << PAGE_SHIFT) would overflow on an x86 system which has more
than 4GB memory, and hence cause vmap to fail every time.
Signed-off-by: Michael Chen <micche@....com>
Patch
diff -Nur linux-2.4.21-40.EL/mm/vmalloc.c
linux-2.4.21-40.EL.diff/mm/vmalloc.c
--- linux-2.4.21-40.EL/mm/vmalloc.c 2006-02-02 21:13:20.000000000
-0600
+++ linux-2.4.21-40.EL.diff/mm/vmalloc.c 2006-09-04
11:29:33.000000000 -0500
@@ -298,8 +298,8 @@
struct vm_struct *area;
unsigned long size = count << PAGE_SHIFT;
- if (!size || size > (max_mapnr << PAGE_SHIFT))
- return NULL;
+ if (!count || count > max_mapnr)
+ return NULL;
area = get_vm_area(size, flags);
if (!area) {
return NULL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists