OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74ae998
)
[SPARC64]: Fix loop termination in mark_kpte_bitmap()
author
David S. Miller
<davem@sunset.davemloft.net>
Mon, 6 Mar 2006 06:18:50 +0000
(22:18 -0800)
committer
David S. Miller
<davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:14:19 +0000
(
01:14
-0800)
If we were aligned, but didn't have at least 256MB left
to process, we would loop forever.
Thanks to fabbione for the report and testing the fix.
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/mm/init.c
patch
|
blob
|
history
diff --git
a/arch/sparc64/mm/init.c
b/arch/sparc64/mm/init.c
index
5930e87
..
9bbd0bf
100644
(file)
--- a/
arch/sparc64/mm/init.c
+++ b/
arch/sparc64/mm/init.c
@@
-973,12
+973,15
@@
static void __init mark_kpte_bitmap(unsigned long start, unsigned long end)
while (start < end) {
long remains;
+ remains = end - start;
+ if (remains < size_256MB)
+ break;
+
if (start & mask_256MB) {
start = (start + size_256MB) & ~mask_256MB;
continue;
}
- remains = end - start;
while (remains >= size_256MB) {
unsigned long index = start >> shift_256MB;