From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77914BA4F for ; Tue, 7 Mar 2023 19:23:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AB68C4339B; Tue, 7 Mar 2023 19:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678216992; bh=7kyoS8ZgytWpoBl67Th/zqjZIXV9l0/AxtG+zXqfKgY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JsQKPiLNFSZv52JQmLTDiJGOHIfWn+gpiebtotU3usFGeOzq1kkCxQHdzijBGBa6a aB405zKj+SRVYVoaeJIJjYBfOA1+vqApMu/c/fzd6NovCF92FBEmXW1WkCHwz1U3So pUPGeVso9f37se5dcjnELYJsyaGCEiJbqqFfC+RsIofoao2TJCavDBi+S2BEITiRU7 DsayApFQtrQ1qnvtfJaqB0hzTyb7BW/cMJegFJdBCsXBH/KVml+/drYWeXjcmownRh 4BRDCYa+6D8QqNR7RitAo45xWUJH1lA2SmIvYtUXbv9BTholZBHHRKDvqzwk6x7aBR faEZN3VpW/hjQ== Date: Tue, 7 Mar 2023 19:23:10 +0000 From: Eric Biggers To: Greg Kroah-Hartman Cc: stable@vger.kernel.org, patches@lists.linux.dev, Jan Kara , Theodore Tso , linux-ext4@vger.kernel.org Subject: Re: [PATCH 6.1 788/885] ext4: Fix possible corruption when moving a directory Message-ID: References: <20230307170001.594919529@linuxfoundation.org> <20230307170036.133148515@linuxfoundation.org> Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230307170036.133148515@linuxfoundation.org> On Tue, Mar 07, 2023 at 06:02:02PM +0100, Greg Kroah-Hartman wrote: > From: Jan Kara > > commit 0813299c586b175d7edb25f56412c54b812d0379 upstream. > > When we are renaming a directory to a different directory, we need to > update '..' entry in the moved directory. However nothing prevents moved > directory from being modified and even converted from the inline format > to the normal format. When such race happens the rename code gets > confused and we crash. Fix the problem by locking the moved directory. > > CC: stable@vger.kernel.org > Fixes: 32f7f22c0b52 ("ext4: let ext4_rename handle inline dir") > Signed-off-by: Jan Kara > Link: https://lore.kernel.org/r/20230126112221.11866-1-jack@suse.cz > Signed-off-by: Theodore Ts'o > Signed-off-by: Greg Kroah-Hartman This commit has a reported regression (https://lore.kernel.org/linux-ext4/5efbe1b9-ad8b-4a4f-b422-24824d2b775c@kili.mountain), so probably it should not be backported quite yet. - Eric