Hmm, you should also init the spinlock somewhere in copy_process.Otherwise when a process is forked in the middle of [gs]et_task_commcalled on it on another cpu, you have two locked locks and only theparent's will be unlocked, right?