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
F120606206: D50417.id156007.diff
Thu, Jun 19, 1:19 PM
Unknown Object (File)
Sun, Jun 15, 11:39 PM
Unknown Object (File)
Fri, Jun 13, 10:43 AM
Unknown Object (File)
Thu, Jun 5, 4:26 AM
Unknown Object (File)
Tue, Jun 3, 4:01 PM
Unknown Object (File)
Mon, Jun 2, 10:18 AM
Unknown Object (File)
Wed, May 28, 10:32 AM
Unknown Object (File)
Tue, May 27, 2:51 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.Sun, May 25, 6:19 AM
markj marked 3 inline comments as done.

Add another flag variable.

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

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

This revision was automatically updated to reflect the committed changes.