add missing initialization in clone_process()

This commit is contained in:
NAKAMURA Gou
2013-05-29 13:11:18 +09:00
parent 6614bcaa68
commit 248ba5acb8

View File

@@ -84,7 +84,7 @@ struct process *clone_process(struct process *org, unsigned long pc,
return NULL;
}
memset(proc, 0, KERNEL_STACK_NR_PAGES);
memset(proc, 0, sizeof(struct process));
ihk_atomic_set(&proc->refcount, 2); /* one for exit, another for wait */
/* NOTE: sp is the user mode stack! */
@@ -99,6 +99,9 @@ struct process *clone_process(struct process *org, unsigned long pc,
ihk_atomic_inc(&org->vm->refcount);
proc->vm = org->vm;
ihk_mc_spinlock_init(&proc->spin_sleep_lock);
proc->spin_sleep = 0;
return proc;
}