Date: Mon, 1 Jul 2013 03:27:14 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252436 - head/sys/kern Message-ID: <201307010327.r613REG0045150@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307010327.r613REG0045150>