opnsense-src/sys/fs
Mark Johnston 0f5b6f9a04 fdescfs: Fix a file ref leak
In fdesc_lookup(), vn_vget_ino_gen() may fail without invoking the
callback, in which case the ref on fp is leaked.  This happens if the
fdescfs mount is being concurrently unmounted.  Moreover, we cannot
safely drop the ref while the dvp is locked.

So:
- Use a flag variable to indicate whether the ref is dropped.
- Reorganize things to handle the leak.

Reported by:	C Turt <ecturt@gmail.com>
Reviewed by:	mjg, kib
Tested by:	pho
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39189
2023-03-22 09:19:27 -04:00
..
autofs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
cd9660 Stop cleaning MNT_LOCAL on unmount 2023-01-14 20:28:11 +02:00
cuse cuse(3): Cosmetic change about testing boolean values. 2022-10-04 13:51:06 +02:00
deadfs vn_open(): If the vnode is reclaimed during open(2), do not return error. 2021-02-12 03:02:20 +02:00
devfs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
ext2fs Fix compilation issue, when DTRACE is not defined 2023-03-20 23:06:57 +03:00
fdescfs fdescfs: Fix a file ref leak 2023-03-22 09:19:27 -04:00
fifofs fifofs: ansify 2023-02-07 23:18:51 +00:00
fuse fusefs: fix some resource leaks 2023-02-14 14:19:59 -07:00
mntfs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
msdosfs msdosfs: fix debug print format and parameter 2023-03-08 17:58:00 +01:00
nfs nfscl: Add a new NFSv4.1/4.2 mount option for Kerberized mounts 2023-03-16 15:55:36 -07:00
nfsclient nfscl: Add a new NFSv4.1/4.2 mount option for Kerberized mounts 2023-03-16 15:55:36 -07:00
nfsserver nfscl: Add a new NFSv4.1/4.2 mount option for Kerberized mounts 2023-03-16 15:55:36 -07:00
nullfs nullfs: ansify 2023-02-07 23:22:27 +00:00
procfs vm_pager: Remove references to KVME_TYPE_DEFAULT in the kernel 2022-07-17 07:09:48 -04:00
pseudofs pseudofs: Fix LOR in VOP_READDIR. 2023-02-26 15:30:53 +00:00
smbfs smbfs: ansify 2023-02-07 23:35:11 +00:00
tarfs tarfs: Fix backtracking during node creation. 2023-03-16 11:31:22 +00:00
tmpfs tmpfs: support the nosymfollow mount option 2023-02-23 15:15:17 +02:00
udf udf: ansify 2023-02-07 23:24:24 +00:00
unionfs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00