Page MenuHomeFreeBSD

vfs: Fix vop_stdis_text()
ClosedPublic

Authored by markj on Nov 19 2024, 2:56 PM.
Tags
None
Referenced Files
F169762041: D47672.id146691.diff
Wed, Sep 2, 11:57 AM
F169747799: D47672.diff
Wed, Sep 2, 11:04 AM
F169746594: D47672.id146706.diff
Wed, Sep 2, 10:59 AM
F169731973: D47672.id146723.diff
Wed, Sep 2, 9:59 AM
F169708972: D47672.id146716.diff
Wed, Sep 2, 8:39 AM
F169706308: D47672.id.diff
Wed, Sep 2, 8:31 AM
Unknown Object (File)
Mon, Aug 31, 10:06 AM
Unknown Object (File)
Mon, Aug 31, 8:40 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.