aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/process.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 23:13:51 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 23:13:51 +0100
commit817b7848dca5b7080ba53666eb2dd8f37b05453a (patch)
tree73b5e37afe39e1bc05904685095d83a44d4bd353 /src/kernel/user/process.c
parent73cf3eddd480f2bd7e987c58da82c243861a5314 (diff)
downloadkogata-817b7848dca5b7080ba53666eb2dd8f37b05453a.tar.gz
kogata-817b7848dca5b7080ba53666eb2dd8f37b05453a.zip
Fix mchmap. Lesson : invalid pointer dereferences happen! with unexpected results.
Diffstat (limited to 'src/kernel/user/process.c')
-rw-r--r--src/kernel/user/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c
index 72042d9..fc608a7 100644
--- a/src/kernel/user/process.c
+++ b/src/kernel/user/process.c
@@ -220,7 +220,7 @@ bool mchmap(process_t *proc, void* addr, int mode) {
// change mode on already mapped pages
pagedir_t *save_pd = get_current_pagedir();
switch_pagedir(proc->pd);
- for (void* it = r->addr; it < r->addr + r->size; r += PAGE_SIZE) {
+ for (void* it = r->addr; it < r->addr + r->size; it += PAGE_SIZE) {
uint32_t ent = pd_get_entry(it);
uint32_t frame = pd_get_frame(it);