Page MenuHomeFreeBSD

vfs: Fix vop_stdis_text()
ClosedPublic

Authored by markj on Nov 19 2024, 2:56 PM.
Tags
None
Referenced Files
F107620573: D47672.diff
Thu, Jan 16, 6:51 PM
Unknown Object (File)
Wed, Jan 15, 5:57 PM
Unknown Object (File)
Mon, Jan 6, 1:56 PM
Unknown Object (File)
Sun, Jan 5, 5:51 AM
Unknown Object (File)
Tue, Dec 31, 8:40 AM
Unknown Object (File)
Fri, Dec 27, 10:51 AM
Unknown Object (File)
Fri, Dec 27, 9:44 AM
Unknown Object (File)
Fri, Dec 27, 9:39 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 60694
Build 57578: arc lint + arc unit

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.