diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2023-11-18 09:23:22 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-11-28 17:32:53 +0000 |
commit | 326836a1ebc6ce9b28c8f2bc1d177a444fba8ea6 (patch) | |
tree | 388db3b5b328f07325ad6069a75468f61dac8489 | |
parent | c5405d1c850765d04f74067ebb71f57e9a26b8ea (diff) | |
download | src-326836a1ebc6ce9b28c8f2bc1d177a444fba8ea6.tar.gz src-326836a1ebc6ce9b28c8f2bc1d177a444fba8ea6.zip |
nullfs: do not allow bypass on copy_file_range()
There must be no callers of VOP_COPY_FILE_RANGE() except
vn_copy_file_range(), which does enough to find the write-vnodes where
to call the VOP.
Reviewed by: markj, Olivier Certner <olce.freebsd@certner.fr>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D42603
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index c05e3394a9a6..4747b1dd5b82 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -1177,5 +1177,6 @@ struct vop_vector null_vnodeops = { .vop_vptofh = null_vptofh, .vop_add_writecount = null_add_writecount, .vop_vput_pair = null_vput_pair, + .vop_copy_file_range = VOP_PANIC, }; VFS_VOP_VECTOR_REGISTER(null_vnodeops); |