[Bug 272678] VFS: Incorrect data in read from concurrent write

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 23 Jul 2023 14:18:25 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272678

--- Comment #2 from Andrew "RhodiumToad" Gierth <andrew@tao11.riddles.org.uk> ---
(In reply to Andrew "RhodiumToad" Gierth from comment #1)

Concurrent truncate doesn't, so far in my testing, result in any crashes, but
it can cause the reader to read data with 0x00 in place of the original bytes.

i.e. file initially contains some non-zero bytes; read and ftruncate(fd,0)
race; read might return non-zero bytes read based on the old length, but with
the data zeroed.

(I noticed another comment in uiomove_object that said that the tmpfs vnode
lock was held, even though it might not be.)

-- 
You are receiving this mail because:
You are the assignee for the bug.