svn commit: r237080 - head/sys/kern

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Jun 14 16:23:16 UTC 2012


Author: pjd
Date: Thu Jun 14 16:23:16 2012
New Revision: 237080
URL: http://svn.freebsd.org/changeset/base/237080

Log:
  Assert that the filedesc lock is being held when the fdunwrap() function
  is called.
  
  MFC after:	1 month

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Thu Jun 14 16:20:19 2012	(r237079)
+++ head/sys/kern/kern_descrip.c	Thu Jun 14 16:23:16 2012	(r237080)
@@ -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);


More information about the svn-src-head mailing list