diff options
author | sos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk> | 2006-07-25 10:59:02 +0100 |
---|---|---|
committer | sos22@douglas.cl.cam.ac.uk <sos22@douglas.cl.cam.ac.uk> | 2006-07-25 10:59:02 +0100 |
commit | 8903f962c4b78a000024e7f2205ce6ccf2bab3a8 (patch) | |
tree | e2017f70f425349fc11287aff079aba670777190 /extras/mini-os/mm.c | |
parent | c68c9055abfd6a4b0160c04af526e903e2aba47e (diff) | |
download | xen-8903f962c4b78a000024e7f2205ce6ccf2bab3a8.tar.gz xen-8903f962c4b78a000024e7f2205ce6ccf2bab3a8.tar.bz2 xen-8903f962c4b78a000024e7f2205ce6ccf2bab3a8.zip |
[MINI-OS] Fix a bug which prevented map_frames being used more than once.
Found by John D. Ramsdell <ramsdell@mitre.org>
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/mm.c')
-rw-r--r-- | extras/mini-os/mm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/mini-os/mm.c b/extras/mini-os/mm.c index 980e32c0a2..03fb3e9ab5 100644 --- a/extras/mini-os/mm.c +++ b/extras/mini-os/mm.c @@ -687,7 +687,7 @@ void *map_frames(unsigned long *f, unsigned long n) /* Find a run of n contiguous frames */ for (x = 0; x <= 1024 - n; x += y + 1) { for (y = 0; y < n; y++) - if (demand_map_pgt[y] & _PAGE_PRESENT) + if (demand_map_pgt[x+y] & _PAGE_PRESENT) break; if (y == n) break; |