32 bit overflow in mm/page_alloc.c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-restricted-modules-2.6.15 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
linux-source-2.6.15 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: linux-source-2.6.15
This patch has already been entered into latest -mm kernel and since it is trivial we would like to see it in dappers 2.6.15 if possible.
============
The patch titled
setup_
has been added to the -mm tree. Its filename is
setup_
See http://
out what to do about this
From: Andrew Morton <email address hidden>
As pointed out in http://
function can experience overflows on 32-bit machines, causing our response to
changed values of min_free_kbytes to go whacky.
Fixing it efficiently is all too hard, so fix it with 64-bit math instead.
Cc: Ake Sandgren <email address hidden>
Cc: Martin Bligh <email address hidden>
Signed-off-by: Andrew Morton <email address hidden>
---
mm/page_alloc.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff -puN mm/page_
--- 25/mm/page_
+++ 25-akpm/
@@ -2635,9 +2635,11 @@ void setup_per_
}
- unsigned long tmp;
+ u64 tmp;
+
- tmp = (pages_min * zone->present_
+ tmp = (u64)pages_min * zone->present_
+ do_div(tmp, lowmem_pages);
if (is_highmem(zone)) {
@@ -2664,8 +2666,8 @@ void setup_per_
}
- zone->pages_low = zone->pages_min + tmp / 4;
- zone->pages_high = zone->pages_min + tmp / 2;
+ zone->pages_low = zone->pages_min + tmp >> 2;
+ zone->pages_high = zone->pages_min + tmp >> 1;
}
Changed in linux-source-2.6.15: | |
status: | Unconfirmed → Fix Committed |
Changed in linux-source-2.6.15: | |
status: | Fix Committed → Fix Released |
Changed in linux-restricted-modules-2.6.15: | |
status: | New → Fix Released |