diff --git a/mm/memory.c b/mm/memory.c index 2172bd4..d2301ee 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -372,7 +372,7 @@ void do_no_page(unsigned long error_code,unsigned long address) int block,i; /* if (current->pid > 5) - printk(" --do_no_page: address=%x, pid=%d\n", address, current->pid); */ + printk(" --do_no_page: address=%x, pid=%d\n", address, current->pid); */ address &= 0xfffff000; tmp = address - current->start_code; @@ -426,14 +426,13 @@ int do_execve2(unsigned long * eip,long tmp,char * filename, unsigned long page; int block,i; unsigned long address=current->start_code; - + //this part comes from do_no_page as achievement of immediate loading of cs and ds while(address<=current->brk+current->start_code) { - address &= 0xfffff000; temp = address - current->start_code; if (share_page(temp)) - return; + return -1; if (!(page = get_free_page())) oom(); block = 1 + temp/BLOCK_SIZE; @@ -444,8 +443,6 @@ int do_execve2(unsigned long * eip,long tmp,char * filename, { free_page(page); oom(); - printk("error"); - return -1; } address+=PAGE_SIZE; }