From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A9D8C433F5 for ; Fri, 18 Feb 2022 09:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233265AbiBRJWN (ORCPT ); Fri, 18 Feb 2022 04:22:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233467AbiBRJWM (ORCPT ); Fri, 18 Feb 2022 04:22:12 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D23B2C12E for ; Fri, 18 Feb 2022 01:21:54 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 6278F5C032E; Fri, 18 Feb 2022 04:21:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 18 Feb 2022 04:21:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=DgI7RoIgCzUtmx6H7PnK5Q2Jk4f1gRg6tBy5QI ZLfSI=; b=oun3aAJhg5AiGpi9iNC5FEZl+AB3CPXrC/og7jE4vbdH/b+T807VKX qPICc7GrgsR/MYADke/xmVguoylkARjhSMoC/MIeHEqt6cX/gyCCfiWOki4vyLGR Dj5o9LNnc5ELmiX2ZD5x5XwaQjzIjQ0WgH4Qdb8dghF1Hm1WKzWdz86KCnzm4VPq /QGrk7DPNKhicsjoJLlTV196KY/RRcQ4WrecRSSW0O04yYJzVcyBWlAD1MufxBsv Dj5QvZ1AMd/4OIFpTBLX2QF+GzMRlYnf052clTFL0ILjKh+YAWLKLqYUXCZvWTeK 4E2l1yaAMREcqEDp541Gcs1FVYq31lNw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=DgI7RoIgCzUtmx6H7 PnK5Q2Jk4f1gRg6tBy5QIZLfSI=; b=Y9uHHLGAVQa0Irvt5c9WaN7DelIm4ztmP 82pBu832KyYftNEhWMUcsakLK+GkBG5eFYWhoP34JBANWIG5kpTJevA2lCoxO6LC 0FldpqBvIkLoQygLJ3nyRVL1lO3KbJULT2np6zv8NusBa6I3nw4gUL8MYfPPQgVX M9mAt0aximw53Ghgs4MoaFIjz2qMl3eXoPHaUjHRACMRgyB0G8Q6AW5TucMaigCj a35xXXPWuGII8R9ymjqOPUOcQp7/hH+mcxDZJI26uGYVrJ6DdisZk2e785tWTVGZ Q7N/gxhcLGFRbvALwS85aXcTXCjsgv62AL2QRE5ohIoBeLRm0LYtQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkedtucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcumffjuceo ghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeuleeltdehkeelte fhleduuddvhfffuedvffduveegheekgeeiffevheegfeetgfenucffohhmrghinhepkhgv rhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Feb 2022 04:21:50 -0500 (EST) Date: Fri, 18 Feb 2022 10:21:48 +0100 From: Greg KH To: Leah Rumancik Cc: stable@vger.kernel.org, Zhang Yi , Theodore Ts'o Subject: Re: [PATCH for 5.4 1/3] ext4: check for out-of-order index extents in ext4_valid_extent_entries() Message-ID: References: <20220217225914.40363-1-leah.rumancik@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220217225914.40363-1-leah.rumancik@gmail.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Feb 17, 2022 at 02:59:12PM -0800, Leah Rumancik wrote: > From: Zhang Yi > > commit 8dd27fecede55e8a4e67eef2878040ecad0f0d33 upstream. > > After commit 5946d089379a ("ext4: check for overlapping extents in > ext4_valid_extent_entries()"), we can check out the overlapping extent > entry in leaf extent blocks. But the out-of-order extent entry in index > extent blocks could also trigger bad things if the filesystem is > inconsistent. So this patch add a check to figure out the out-of-order > index extents and return error. > > [Added pblk argument to ext4_valid_extent_entries because pblk is > updated in the case of overlapping extents. This argument was added > in commit 54d3adbc29f0c7c53890da1683e629cd220d7201.] > > Signed-off-by: Zhang Yi > Reviewed-by: Theodore Ts'o > Link: https://lore.kernel.org/r/20210908120850.4012324-2-yi.zhang@huawei.com > Signed-off-by: Theodore Ts'o > Signed-off-by: Leah Rumancik > --- > fs/ext4/extents.c | 21 ++++++++++++++------- > 1 file changed, 14 insertions(+), 7 deletions(-) All now queued up, thanks. greg k-h