Date: Wed, 27 Jan 2016 19:11:12 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294933 - head/sys/dev/filemon Message-ID: <201601271911.u0RJBC1s060974@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Wed Jan 27 19:11:11 2016 New Revision: 294933 URL: https://svnweb.freebsd.org/changeset/base/294933 Log: Drop any previous fd when setting a new one. Reported by: mjg Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Wed Jan 27 18:12:42 2016 (r294932) +++ head/sys/dev/filemon/filemon.c Wed Jan 27 19:11:11 2016 (r294933) @@ -148,6 +148,9 @@ filemon_ioctl(struct cdev *dev, u_long c switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: + if (filemon->fp != NULL) + fdrop(filemon->fp, td); + error = fget_write(td, *(int *)data, #if __FreeBSD_version >= 900041 cap_rights_init(&rights, CAP_PWRITE),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601271911.u0RJBC1s060974>