svn commit: r252436 - head/sys/kern

Mikolaj Golub trociny at FreeBSD.org
Mon Jul 1 03:27:15 UTC 2013


Author: trociny
Date: Mon Jul  1 03:27:14 2013
New Revision: 252436
URL: http://svnweb.freebsd.org/changeset/base/252436

Log:
  Plug up the lock lock leakage when exporting to a short buffer.
  
  Reported by:	Alexander Leidinger
  Submitted by:	mjg
  MFC after:	1 week

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Mon Jul  1 03:00:15 2013	(r252435)
+++ head/sys/kern/kern_descrip.c	Mon Jul  1 03:27:14 2013	(r252436)
@@ -3272,6 +3272,8 @@ export_fd_to_sb(void *data, int type, in
 		if (efbuf->remainder < kif->kf_structsize) {
 			/* Terminate export. */
 			efbuf->remainder = 0;
+			if (efbuf->fdp != NULL && !locked)
+				FILEDESC_SLOCK(efbuf->fdp);
 			return (0);
 		}
 		efbuf->remainder -= kif->kf_structsize;


More information about the svn-src-all mailing list