Page MenuHomeFreeBSD

vfs: Fix vop_stdis_text()
ClosedPublic

Authored by markj on Nov 19 2024, 2:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 16, 4:42 AM
Unknown Object (File)
Wed, Oct 1, 4:47 AM
Unknown Object (File)
Fri, Sep 26, 2:54 AM
Unknown Object (File)
Fri, Sep 19, 12:41 PM
Unknown Object (File)
Sep 17 2025, 7:44 AM
Unknown Object (File)
Sep 17 2025, 6:54 AM
Unknown Object (File)
Sep 16 2025, 10:01 AM
Unknown Object (File)
Sep 15 2025, 7:38 PM
Subscribers

Details

Summary

atomic(9) primitives are documented as operating on unsigned types.
Here, we need a cast to avoid a tautological comparison.

Reported by: NetApp
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Fixes: e511bd1406fa ("vfs: fully lockless v_writecount adjustment")

Diff Detail

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

Event Timeline

markj requested review of this revision.Nov 19 2024, 2:56 PM

So currently ETXTBSY does not work?

This revision is now accepted and ready to land.Nov 19 2024, 3:14 PM
In D47672#1087062, @kib wrote:

So currently ETXTBSY does not work?

It's not that bad. It means that access(write perms) will return 0 even if the file is being executed (it should return ETXTBUSY to userspace), but VOP_ADD_WRITECOUNT will still fail.

I will write a quick regression test.

This revision now requires review to proceed.Nov 19 2024, 3:54 PM
kib added inline comments.
contrib/netbsd-tests/lib/libc/sys/t_access.c
193

It might be somewhat harder to code, but use of sysctl kern.proc.pathname.-1 is more appropriate there IMO.

This revision is now accepted and ready to land.Nov 19 2024, 4:01 PM
This revision now requires review to proceed.Nov 19 2024, 6:19 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 19 2024, 9:19 PM
This revision was automatically updated to reflect the committed changes.