summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-06-14 16:23:16 +0000
committerpjd <pjd@FreeBSD.org>2012-06-14 16:23:16 +0000
commit0984458a799973509f49effefcd1c6ed21736777 (patch)
tree631d05846ee2b9cb3f8baaca0463fb61c6301545 /sys/kern/kern_descrip.c
parent9afb01f39d37ecef93c5227d153d9e7921634a58 (diff)
downloadFreeBSD-src-0984458a799973509f49effefcd1c6ed21736777.zip
FreeBSD-src-0984458a799973509f49effefcd1c6ed21736777.tar.gz
Assert that the filedesc lock is being held when the fdunwrap() function
is called. MFC after: 1 month
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 4a692a6..e204e68 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -445,6 +445,8 @@ static inline int
fdunwrap(int fd, cap_rights_t rights, struct filedesc *fdp, struct file **fpp)
{
+ FILEDESC_LOCK_ASSERT(fdp);
+
*fpp = fdtofp(fd, fdp);
if (*fpp == NULL)
return (EBADF);
OpenPOWER on IntegriCloud