svn commit: r289450 - head/lib/libcam
NGie Cooper
yaneurabeya at gmail.com
Sat Oct 17 09:12:56 UTC 2015
> On Oct 17, 2015, at 02:07, Garrett Cooper <ngie at 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
More information about the svn-src-all
mailing list