diff options
| author | Mateusz Guzik <mjg@FreeBSD.org> | 2025-10-05 17:03:54 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2025-10-14 23:08:01 -0700 |
| commit | 9bea2657c4538f234709a97010f05e2b776c87a6 (patch) | |
| tree | 73518a36f0cd66efc5e142a196fec2da1de57cd2 /usr.bin | |
| parent | bf591ddc87aa0fdc0fff279fbef3d3570ea56666 (diff) | |
vfs offset: fix assertion failure in face of racing ffofset and setfl locking
Both use the same 16 bit var to store their locked and waiters bits,
then this in file_v_unlock:
state = atomic_load_16(flagsp);
if ((state & lock_wait_bit) == 0 &&
atomic_cmpset_rel_16(flagsp, state, state & ~lock_bit))
return;
can fail if for example foffset is being unlocked while setfl is getting
locked.
Afterwards the code assumes there are blocked waiters on foffset.
Approved by: re (cperciva)
Reviewed by: kib, markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D52915
(cherry picked from commit f43e19db6cea0a7dd7bf51f3fe2227d466ea5a80)
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions
