Page MenuHomeFreeBSD

namei: Fix cn_flags width in various places
ClosedPublic

Authored by markj on May 19 2025, 3:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 7, 8:47 AM
Unknown Object (File)
Mon, Jul 7, 7:36 AM
Unknown Object (File)
Sun, Jul 6, 9:23 AM
Unknown Object (File)
Sat, Jul 5, 5:27 PM
Unknown Object (File)
Sat, Jul 5, 7:03 AM
Unknown Object (File)
Fri, Jul 4, 11:24 PM
Unknown Object (File)
Fri, Jul 4, 5:01 PM
Unknown Object (File)
Wed, Jul 2, 11:42 PM

Details

Summary

This truncation is mostly harmless today, but fix it anyway to avoid
pain later down the road.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.May 19 2025, 3:59 PM
sys/fs/fuse/fuse_vnops.c
1434–1435

Also I cannot match the local sources for fuse_vnops.c with the patch. In my copy there is also a line

	int flags = cnp->cn_flags;

which clearly needs fixing.

Thanks.

sys/fs/fuse/fuse_vnops.c
1434–1435

Also I cannot match the local sources for fuse_vnops.c with the patch.

It is also in the base here, but Mark removed it. This might be a potential subtle change in semantics, as cn_flags is modified below between former uses of flags (the only test performed on flags was whether ISDOTDOT was present, which I suspect is never changed, but didn't check thoroughly).

sys/fs/fuse/fuse_vnops.c
1434–1435

I got rid of the local flags variable, indeed, as the code below uses both flags and cnp->cn_flags, which seems confusing.

Convert a predicate to a bool

kib added inline comments.
sys/fs/fuse/fuse_vnops.c
1434–1435

I also would add bool isdotdot

This revision is now accepted and ready to land.May 25 2025, 6:19 AM
markj marked 3 inline comments as done.

Add another flag variable.

This revision now requires review to proceed.May 25 2025, 2:53 PM
This revision is now accepted and ready to land.May 25 2025, 4:38 PM

Much clearer with a bool indeed, and solves my concern.

This revision was automatically updated to reflect the committed changes.