From nobody Mon Jul 24 22:04:12 2023 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R8vMK6rpTz4pV89 for ; Mon, 24 Jul 2023 22:04:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R8vMK5M76z4FDx for ; Mon, 24 Jul 2023 22:04:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690236253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WufjMuuykfC6D74u84wfixuSrLGytmEzx3eYXeHiN/g=; b=rNdcil4nW5VoUDGu5blT3W9fZ9HKexTENYylRrq90iAC8tJIx8sDfM0sZIKaKGohguULRx O/isIfX5ANa9emb3orZDxpa/JP348JFEbXm6lUxToV4b8xt/d0S96o4r9Slgt3XwaQEy89 Z3nJAL0bmzvI8RYqhArcZEDtcSqPLfZqUBg1ZcP19HxcascBrsCNZKgh03sVf/WlJh6s4f c/7MZu/Dgaaqk5pYy8R7UqR40ZLZdiiWmmTCKjmOX4470MmsDFX0Glf/LQwhO2XPE0mgF8 fKobnTo4ud6g3JrQTu2frQE31qwRIwnWK9cTKFzeTpiKQkGkMVYDj0233mqchQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690236253; a=rsa-sha256; cv=none; b=kyBOX+hwMUHkQtEYtS3Zw6z84Nt8DkYGECet/tVoYrLndi7P/gkblsAJZF5BQDH40i9bao Kta8Z+SkQg1j7UsUmZwo6BiX78q9QpcgKm3OK/rLscOb/ZHzGQkhsexW8FIJEgkr6vaFqJ Zo/Z31l25GZ1dWbRrl+6VjEB492Tp0+T/JPF0QIwwmPNXzpj4MtU2tKpPz+FnbShFPe2gM rspcTH2VfXAZp2NwkONutOTpmDC5CM5oQwtziggyqAWFS2FZNrs1OyJHVDdhRf7nnSiGrS TTKNqO7LAkrQvrsdpjuqfgu6lIlQEE8usIF2AvzAUSFzRKuqjkli9AoAzWP2pw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R8vMK41MZzZhZ for ; Mon, 24 Jul 2023 22:04:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36OM4DWZ050931 for ; Mon, 24 Jul 2023 22:04:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36OM4DB3050929 for fs@FreeBSD.org; Mon, 24 Jul 2023 22:04:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 272678] VFS: Incorrect data in read from concurrent write Date: Mon, 24 Jul 2023 22:04:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272678 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D5b353925ff61b9ddb97bb453ba75278b5= 78ed7d9 commit 5b353925ff61b9ddb97bb453ba75278b578ed7d9 Author: Konstantin Belousov AuthorDate: 2023-07-23 15:55:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-07-24 22:02:59 +0000 vnode read(2)/write(2): acquire rangelock regardless of do_vn_io_fault() To ensure atomicity of reads against parallel writes and truncates, vnode lock was not enough at least since introduction of vn_io_fault(). That code only take rangelock when it was possible that vn_read() and vn_write() could drop the vnode lock. At least since the introduction of VOP_READ_PGCACHE() which generally does not lock the vnode at all, rangelocks become required even for filesystems that do not need vn_io_fault() workaround. For instance, tmpfs. PR: 272678 Analyzed and reviewed by: Andrew Gierth=20 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D41158 sys/kern/vfs_vnops.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=