freebsd-src/sys/fs/fdescfs
Konstantin Belousov 51b8ffb95c fdesc_allocvp(): fix potential use after free
Just owning the interlock is not enough for vget() to operate on the
vnode race-free with vgone(), the vnode should be held.  Use
vget_prep()/vget_finish() to avoid vholding the vnode explicitly, and
drop LK_INTERLOCK.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D39207
2023-03-24 19:46:53 +02:00
..
fdesc.h fdescfs: add an option to return underlying file vnode on lookup 2021-06-04 03:30:12 +03:00
fdesc_vfsops.c fdescfs: remove useless XXX comment, unwrap line 2023-03-24 19:46:47 +02:00
fdesc_vnops.c fdesc_allocvp(): fix potential use after free 2023-03-24 19:46:53 +02:00