[Bug 269341] [msdosfs] deadlock with sendfile

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Feb 2023 22:32:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269341

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=0152d453a08fa2bad694dc04a8184fce2b7faa10

commit 0152d453a08fa2bad694dc04a8184fce2b7faa10
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-02-11 18:09:30 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-02-13 22:29:42 +0000

    msdosfs deextend: validate pages of the partial buffer

    Suppose that the cluster size is larger than page size. If the buffer
    at the old EOF (before extending) was partial and dirty, it cannot be
    automatically neither written out nor validated by the buffer cache,
    since extending buffer adds invalid pages at the end.

    Correct the buffer state by calling vfs_bio_clrbuf() on it, to mark
    newly added and zeroed pages as valid.

    Note that UFS is immune to the problem because ffs_truncate() always
    allocate the block and buffer for the last byte of the file.

    PR:     269341
    Reported by:    asomers
    In collaboration with:  pho
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D38549

 sys/fs/msdosfs/msdosfs_denode.c | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

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