Fix thread status race-condition caused by hold_thread() in do_kill() and terminate()
Conflicts: arch/x86_64/kernel/syscall.c kernel/syscall.c
This commit is contained in:
@@ -2571,14 +2571,15 @@ out:
|
||||
return error;
|
||||
}
|
||||
|
||||
void hold_thread(struct thread *thread)
|
||||
int hold_thread(struct thread *thread)
|
||||
{
|
||||
if (thread->status == PS_EXITED) {
|
||||
panic("hold_thread: already exited process");
|
||||
kprintf("hold_thread: ERROR: already exited process,tid=%d\n", thread->tid);
|
||||
return -ESRCH;
|
||||
}
|
||||
|
||||
ihk_atomic_inc(&thread->refcount);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user