Do not lock the process when calling fdfree() (this would have recursed on
a non-recursive lock, the proc lock, before) since we don't need it to change p_fd.
This commit is contained in:
parent
6d345e2a45
commit
6222047300
@ -257,10 +257,8 @@ fork1(td, flags, pages, procp)
|
||||
if (flags & RFCFDG) {
|
||||
struct filedesc *fdtmp;
|
||||
fdtmp = fdinit(td); /* XXXKSE */
|
||||
PROC_LOCK(p1);
|
||||
fdfree(td); /* XXXKSE */
|
||||
p1->p_fd = fdtmp;
|
||||
PROC_UNLOCK(p1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -273,10 +271,8 @@ fork1(td, flags, pages, procp)
|
||||
|
||||
newfd = fdcopy(td);
|
||||
FILEDESC_UNLOCK(p1->p_fd);
|
||||
PROC_LOCK(p1);
|
||||
fdfree(td);
|
||||
p1->p_fd = newfd;
|
||||
PROC_UNLOCK(p1);
|
||||
} else
|
||||
FILEDESC_UNLOCK(p1->p_fd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user