small changes to do_execve2

master
forever-learner 2 years ago
parent a6cbdfd4d7
commit 4159713ef9

@ -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;
}

Loading…
Cancel
Save