From: Anatoli Antonovitch <antonovi@ati.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH]i386: fix overflow in vmap on an x86 system which has more than 4GB memory.
Date: Fri, 15 Sep 2006 11:34:37 -0400 [thread overview]
Message-ID: <1158334477.5219.1.camel@antonovi-desktop> (raw)
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@ati.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;
next reply other threads:[~2006-09-15 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 15:34 Anatoli Antonovitch [this message]
2006-09-23 17:26 ` Hugh Dickins
2006-09-23 23:55 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1158334477.5219.1.camel@antonovi-desktop \
--to=antonovi@ati.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®