• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisiond4a1380db55cbf262bcc24b448b5061fab65113d (tree)
Time2006-09-29 06:20:38
AuthorMichael Chen <micche@ati....>
CommiterWilly Tarreau

Log Message

[PATCH] i386: fix overflow in vmap on an x86 system which has more than 4GB memory.

(max_mapnr << PAGE_SHIFT) would overflow on a system which has
4GB memory or more, and so could cause vmap to fail every time.

Signed-off-by: Michael Chen <micche@ati.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>

Change Summary

Incremental Difference

--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -293,7 +293,7 @@ void * vmap(struct page **pages, int count,
293293 struct vm_struct *area;
294294 unsigned long size = count << PAGE_SHIFT;
295295
296- if (!size || size > (max_mapnr << PAGE_SHIFT))
296+ if (count <= 0 || count > max_mapnr)
297297 return NULL;
298298 area = get_vm_area(size, flags);
299299 if (!area) {
Show on old repository browser