aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2015-09-07 20:02:56 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2015-09-07 20:02:56 +0000
commitd7832811a72cb0f912ff0095f02dec0f6042c185 (patch)
tree0a06b8a458190baeb378492413235f8a0cac26e6 /sys/kern/uipc_usrreq.c
parent40ea8e710e6ae61c6b0f8fdf39828a527c5b9ee6 (diff)
downloadsrc-d7832811a72cb0f912ff0095f02dec0f6042c185.tar.gz
src-d7832811a72cb0f912ff0095f02dec0f6042c185.zip
fd: make the common case in filecaps_copy work lockless
The filedesc lock is only needed if ioctls caps are present, which is a rare situation. This is a step towards reducing the scope of the filedesc lock.
Notes
Notes: svn path=/head/; revision=287539
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index c3a71c8fb351..efed37b8affb 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1972,7 +1972,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td)
fdep[i] = fdev;
fdep[i]->fde_file = fde->fde_file;
filecaps_copy(&fde->fde_caps,
- &fdep[i]->fde_caps);
+ &fdep[i]->fde_caps, true);
unp_internalize_fp(fdep[i]->fde_file);
}
FILEDESC_SUNLOCK(fdesc);