fuse_vnop_copy_file_range(): add safety v_mount for unlocked vnode could be NULL, check for it. Explain why it is safe to access fs-specific data for mp if it is read as non-NULL.
fuse_vnop_copy_file_range(): use vn_lock_pair()
Differential D42625
fuse copy_file_range() fixes kib on Nov 15 2023, 11:06 PM. Authored by Tags None Referenced Files
Details fuse_vnop_copy_file_range(): add safety v_mount for unlocked vnode could be NULL, check for it. Explain why it is safe to access fs-specific data for mp if it is read as non-NULL. fuse_vnop_copy_file_range(): use vn_lock_pair()
Diff Detail
Event TimelineComment Actions LGTM. But under what circumstances can mp be NULL? We should probably add a regression test for that. Comment Actions The vnodes passed to VOP_COPY_FILE_RANGE() are not locked, so they can be reclaimed any moment. Then v_data and v_mount become NULL.
|