Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1365244rwb; Thu, 8 Dec 2022 09:41:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6v4ytiVxNupUg31JbV218/Qk4bojZzXnMryGZu7HW7pplpE5LHFPSiC0wb5p2hyRnM38EX X-Received: by 2002:aa7:cad7:0:b0:461:b693:3d61 with SMTP id l23-20020aa7cad7000000b00461b6933d61mr2692851edt.6.1670521267846; Thu, 08 Dec 2022 09:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670521267; cv=none; d=google.com; s=arc-20160816; b=qOyFd8F7Zil7Lkc/XgaZS6uRO6XHnK5SN0FRnetougEvcQa6ccMYpuj8VOBcBJPCXO gdYCVdE2XgVMj0FjvC+lfFZER/GA6O0uMmXMUa/rcgWbkki+YQA7k0YL10XSRlhIH422 Nnud2t9smWdilmq15S6xWPwy4B2lRsHFQkpONtzRUpRUcwrAhDJDOO0cwlP3zXowGHLS zWLmHucffIp4TL3ZFl5Z10WJcsf2OCkv+JZeZB/+JmjJujv1x7gI+Dk5dPmYdC+pSMnd LyALkDSrrN9J4nXTWJEMFMDoaUjeK8fUg0FFmACfJcLhX0icdz45UUkWHs77brAsLeFc gpnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=tsZZ8SblugiBeKI2nPL9Pmcqi+60QH8uaXdL4Ei3fPM=; b=oWUtn7NyeGwONgMqCVNsCoYFQsEWf5QESfBrVNvm4ox/6wIgs31a6eK/VCpvheW8w9 9b0KKEFPjqPQq8uO+uVV37hb0qR6LvxNhQ59t9Pc7J0JmnpLhy7o2Y31gX1dYbkP0Vti 2obNfF33jmRnHXNz9ShcIXLRtLd4zeofbUJl9ALjtZg1aePP2GccE8ABzmWBvu1kXwOa BNMtE3iRplpCGUuLiMGTWnOttMadX3ufa7S3sI7tcS3W/R7xmxzo+3R2xNnqNL/A0B4T 327ANR4ZHNgpxzb4YAnxxEbvKH0rdAxtjwM5ZwQcYIsW0D7EgJLYd2w/g+DiPts4Pax0 UK0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a056402020200b004693eaeac13si6201745edv.570.2022.12.08.09.40.40; Thu, 08 Dec 2022 09:41:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiLHRQH (ORCPT + 99 others); Thu, 8 Dec 2022 12:16:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiLHRQG (ORCPT ); Thu, 8 Dec 2022 12:16:06 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F06547DA7C; Thu, 8 Dec 2022 09:16:04 -0800 (PST) Received: from [2a02:8108:963f:de38:eca4:7d19:f9a2:22c5]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1p3KV8-0003yK-TT; Thu, 08 Dec 2022 18:16:02 +0100 Message-ID: Date: Thu, 8 Dec 2022 18:16:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] ext4: Fix deadlock due to mbcache entry corruption Content-Language: en-US, de-DE To: Theodore Ts'o , Jan Kara Cc: Andreas Dilger , linux-ext4@vger.kernel.org, stable@vger.kernel.org, Thilo Fromm , Jeremi Piotrowski , Andreas Gruenbacher References: <20221123193950.16758-1-jack@suse.cz> <20221201151021.GA18380@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <9c414060-989d-55bb-9a7b-0f33bf103c4f@leemhuis.info> <20221208091523.t6ka6tqtclcxnsrp@quack3> From: Thorsten Leemhuis In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1670519765;a7663b8f; X-HE-SMSGID: 1p3KV8-0003yK-TT X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 08.12.22 16:39, Theodore Ts'o wrote: > On Thu, Dec 08, 2022 at 10:15:23AM +0100, Jan Kara wrote: >>> Furthermore, the fix which Jan provided, and which apparently fixes >>> the user's problem, (a) doesn't touch the ext4_bmap function, and (b) >>> has a fixes tag for the patch: >>> >>> Fixes: 6048c64b2609 ("mbcache: add reusable flag to cache entries") >>> >>> ... which is a commit which dates back to 2016, and the v4.6 kernel. ?!? >> >> Yes. AFAICT the bitfield race in mbcache was introduced in this commit but >> somehow ext4 was using mbcache in a way that wasn't tripping the race. >> After 65f8b80053 ("ext4: fix race when reusing xattr blocks"), the race >> became much more likely and users started to notice... > > Ah, OK. And 65f8b80053 landed in 6.0, so while the bug may have been > around for much longer, this change made it much more likely that > folks would notice. That's the missing piece and why Microsoft > started noticing this in their "Flatcar" container kernel. Yeah, likely when 65f8b80053 was backported to 5.15.y in 1be97463696c > So I'll update the commit description so that this is more clear, Thx for taking care of this, I'm glad this is on track now. Maybe I should talk to Greg again to revert backported changes like 1be97463696c until fixes for them are ready. > and > then I can figure out how to tell the regression-bot that the > regression should be tracked using commit 65f8b80053 instead of > 51ae846cff5 ("ext4: fix warning in ext4_iomap_begin as race between > bmap and write"). FWIW, there is no strong need to, nobody looks at those details once the regression is fixed. But yeah, that might change over time, so let me take care of that: #regzbot introduced: 65f8b80053 [normally things like that have to be done as a direct or indirect reply to the report, but regzbot knows (famos last words...) how to associate this command with the report, as the patch that started this thread linked to the report using a Link: tag]. Ciao, Thorsten