> On Oct 17, 2015, at 02:07, Garrett Cooper <n...@freebsd.org> wrote: > > Author: ngie > Date: Sat Oct 17 09:07:53 2015 > New Revision: 289450 > URL: https://svnweb.freebsd.org/changeset/base/289450 > > Log: > Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd > descriptor to avoid trashing valid file descriptors that access dev->fd at a > later point in time
That wasn’t a good description — sorry :(. The cam_close_spec_device API doesn’t free `struct cam_device *dev` by design, so something could reuse the structure, or call close on dev->fd (out of band), which could trash valid file descriptor(s) by accident. Thanks! -NGie _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"