HomeFreeBSD

fcntl(F_SETFL): only allow one thread to perform F_SETFL

Description

fcntl(F_SETFL): only allow one thread to perform F_SETFL

Use f_vflags file locking for this.
Allowing more than one thread handling F_SETFL might cause de-sync
between real driver state and flags.

Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D52487

Details

Provenance
kibAuthored on Sep 11 2025, 10:05 AM
Reviewer
markj
Differential Revision
D52487: fcntl(F_SETFL): only allow one thread to perform F_SETFL
Parents
rG0ee6f5efdfc6: kern/vfs_vnops.c: generalize the lock primitive for file foffset
Branches
Unknown
Tags
Unknown