mirror_zfs/module/os/freebsd/zfs
Mark Johnston a2f768f61f FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync()
In general it's possible for a vnode to not have an associated VM
object.  This happens in particular with named pipes, which have
some distinct VOPs, defined in zfs_fifoops.  Thus, this chunk of
zfs_freebsd_fsync() needs to check for the FIFO case, like other
vm_object_mightbedirty() callers do.

(Note that vn_flush_cached_data() calls are predicated on
zn_has_cached_data() returning true, and it checks for a NULL v_object
pointer already.)

Fixes: ef4058fcdc
Reported-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Sean Eric Fagan <sef@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #18015
2025-12-10 10:21:29 -08:00
..
abd_os.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
arc_os.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
crypto_os.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
dmu_os.c Pass flags to more DMU write/hold functions 2025-11-12 13:04:58 -08:00
event_os.c FreeBSD: remove support for FreeBSD < 13.0-RELEASE (#16372) 2024-08-05 16:56:45 -07:00
hkdf.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
kmod_core.c Retire zfs_autoimport_disable kmod option 2025-08-14 14:58:58 -07:00
spa_os.c spa_misc: add an API for spa_namespace_lock 2025-11-12 13:06:54 -08:00
sysctl_os.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
vdev_geom.c Prefer VERIFY0P(n) over VERIFY3P(n, ==, NULL) 2025-08-07 11:41:42 -07:00
vdev_label_os.c Cleanup ZIO_FLAG_IO_RETRY vs TRYHARD usage 2025-11-12 13:05:31 -08:00
zfs_acl.c Pass flags to more DMU write/hold functions 2025-11-12 13:04:58 -08:00
zfs_ctldir.c FreeBSD: Correct _PC_MIN_HOLE_SIZE 2025-10-21 09:50:43 -07:00
zfs_debug.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_dir.c Prefer VERIFY0(n) over VERIFY3U(n, ==, 0) 2025-08-07 11:41:25 -07:00
zfs_file_os.c Enable zhack to work properly with 4k sector size disks 2025-09-10 15:01:32 -07:00
zfs_ioctl_compat.c SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
zfs_ioctl_os.c spa_misc: add an API for spa_namespace_lock 2025-11-12 13:06:54 -08:00
zfs_racct.c Wire O_DIRECT also to Uncached I/O (#17218) 2025-05-13 14:26:55 -07:00
zfs_vfsops.c ZIL: allow zil_commit() to fail with error 2025-08-08 16:43:09 -07:00
zfs_vnops_os.c FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync() 2025-12-10 10:21:29 -08:00
zfs_znode_os.c FreeBSD: Satisfy ASSERT_VOP_IN_SEQC() 2025-09-12 15:05:18 -07:00
zio_crypt.c FreeBSD zio_crypt.c: initialize uio variables before access 2025-11-12 13:04:42 -08:00
zvol_os.c spa_misc: add an API for spa_namespace_lock 2025-11-12 13:06:54 -08:00