diff options
author | rik <rik@FreeBSD.org> | 2005-10-04 16:27:54 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2005-10-04 16:27:54 +0000 |
commit | 947a0d1c6633d30c4078023f04e9187aa24eef29 (patch) | |
tree | af6532930c237b441ba5c77d93b689c1cace9a38 /sys | |
parent | 369f8288e0ca10fee58a73a700c15c46cda1794c (diff) | |
download | FreeBSD-src-947a0d1c6633d30c4078023f04e9187aa24eef29.zip FreeBSD-src-947a0d1c6633d30c4078023f04e9187aa24eef29.tar.gz |
Use FILEDESC_UNLOCK(fdp) after FILE_UNLOCK(p), not before to avoid LOR.
Slightly discussed on current@.
LOR #055
MFC after: 14 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c2bfb93..25caa9f 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -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: |