Add a KASSERT to make it obvious when fork_norfproc() is to be called,
and set *procp to NULL in all cases. Previously, it was not being set in the ERESTART case. This is effectively no-op, since its value is ignored by callers in the error case. Reviewed by: kib@
This commit is contained in:
parent
dfc0276185
commit
087bfb0e6b
@ -199,7 +199,10 @@ fork_norfproc(struct thread *td, int flags, struct proc **procp)
|
||||
int error;
|
||||
struct proc *p1;
|
||||
|
||||
KASSERT((flags & RFPROC) == 0,
|
||||
("fork_norfproc called with RFPROC set"));
|
||||
p1 = td->td_proc;
|
||||
*procp = NULL;
|
||||
|
||||
if (((p1->p_flag & (P_HADTHREADS|P_SYSTEM)) == P_HADTHREADS) &&
|
||||
(flags & (RFCFDG | RFFDG))) {
|
||||
@ -238,7 +241,6 @@ fail:
|
||||
thread_single_end();
|
||||
PROC_UNLOCK(p1);
|
||||
}
|
||||
*procp = NULL;
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user