Use FILEDESC_UNLOCK(fdp) after FILE_UNLOCK(p), not before to avoid LOR.
Slightly discussed on current@. LOR #055 MFC after: 14 days
This commit is contained in:
parent
cb1d4f92ec
commit
826cf005ed
@ -2275,7 +2275,6 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode,
|
||||
fdused(fdp, indx);
|
||||
if (fp != NULL)
|
||||
FILE_LOCK(fp);
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
|
||||
/*
|
||||
* We now own the reference to fp that the ofiles[] array
|
||||
@ -2283,6 +2282,9 @@ dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd, int mode,
|
||||
*/
|
||||
if (fp != NULL)
|
||||
fdrop_locked(fp, td);
|
||||
|
||||
FILEDESC_UNLOCK(fdp);
|
||||
|
||||
return (0);
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user