Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4183872pxk; Tue, 8 Sep 2020 12:53:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmc5OPBLYWP6+uxKRHETWkAyM6bhwoKZ/NyaYqvgmtb8M8nTMvRJb9Fm1eq1r6H43r7Tek X-Received: by 2002:a17:907:444d:: with SMTP id on21mr56341ejb.329.1599594824170; Tue, 08 Sep 2020 12:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599594824; cv=none; d=google.com; s=arc-20160816; b=vcOQFTKjCGlYemlhPWiS0YJBkJqnwRtjPQI9IyrZPuAVEjpvObWqvdK0Tg0pP/GIB1 J68jA3mArVvHKwIBhye+JSdfYUAJe+dpJcWb6xJjDObHCG+SRy+q0eQym+HzKMI2qi8j ilAqXVlbh0v8Y/jMMt/5GsmmFRaHho/XHrBRF9HhmT9Vn/7IjHtk6ODuMce6XqqeFVtI ymSQUM/5y6XWK6jcZouH8yNiJMP/FhKGWeBIOp7hX3N6ofUtTn2j1HYFDcrzv+0tEuGe lJTwAfgtMD9jcx0U4+mkLPcF3s+GteETJ0gcsAgmv1DrIee1L98u1X68DClXPnk+5al6 IntQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IibmT3m/8VHI4ejga/QaGkDvSNTK/tvfwtvZB8O0+4c=; b=UfYIoAOz5MCrDmpywYB2X+QKaKWrrjnO4J9p+KAB+773+awAhgPKk2IbsGR8GYphTK Lf3ibK4wgyaSvNy9Li//Amzwf86mcjSb5drv5+ogUK5R5U0eCMi/NuTpotnuQ2gpG9L7 c9ikiscwapDe5PRf+phXovP1FzvVrJMmKDtb2pX5mGho1Vru/XFAJ8H5BgBBCAQk/fch 3d8+8tjHTKS3YGyM8zJLRGk2//ZepuyoH4zeffMl5zj30uO23lvYlw8reVeO76dCi3fJ J/7Pld00OV35uGozHAx/RJgAUkZ6EOKxK267Wdj7ceMJD5GWBVWgiAjz6TjCwhQsYUQt pm/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ezGF9EYR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si49517edb.85.2020.09.08.12.53.21; Tue, 08 Sep 2020 12:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ezGF9EYR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730512AbgIHPs4 (ORCPT + 99 others); Tue, 8 Sep 2020 11:48:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:38040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730682AbgIHPsE (ORCPT ); Tue, 8 Sep 2020 11:48:04 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 654AE24827; Tue, 8 Sep 2020 15:44:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599579862; bh=syTCNfCCZiG/PsV581E461naabaxAdynx+wq1YAum4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ezGF9EYRDPaucIGIrQeKxbEOnvVXWkqnAjsVqP7RDvTzMiPfm9NTdknyGQ8IIH3Hf qGEQ6yNq0RZZ+EJjKZ+y02TGE2g1/YjZythqX6yM7PwNQUjj/oJrlQC/cpnuI29Tl0 K81KVgq5ruVwSs36S1CYS9kZi0X/NK7tWnLFUJUg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Eric Sandeen , Sasha Levin Subject: [PATCH 5.4 063/129] xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files Date: Tue, 8 Sep 2020 17:25:04 +0200 Message-Id: <20200908152232.849039488@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Darrick J. Wong [ Upstream commit d0c20d38af135b2b4b90aa59df7878ef0c8fbef4 ] The realtime flag only applies to the data fork, so don't use the realtime block number checks on the attr fork of a realtime file. Fixes: 30b0984d9117 ("xfs: refactor bmap record validation") Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Sasha Levin --- fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 3f76da11197c4..19a600443b9ee 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -6179,7 +6179,7 @@ xfs_bmap_validate_extent( isrt = XFS_IS_REALTIME_INODE(ip); endfsb = irec->br_startblock + irec->br_blockcount - 1; - if (isrt) { + if (isrt && whichfork == XFS_DATA_FORK) { if (!xfs_verify_rtbno(mp, irec->br_startblock)) return __this_address; if (!xfs_verify_rtbno(mp, endfsb)) -- 2.25.1