Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp968237pxp; Wed, 9 Mar 2022 17:14:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1vp3PpWp5icsMxYWzUU+Nyq02vzJ4SENMFUMtOLQePUcJdzP2SOUP7XVBDuW8Qt7/gu7C X-Received: by 2002:a17:902:728a:b0:153:e41:eb61 with SMTP id d10-20020a170902728a00b001530e41eb61mr2397892pll.2.1646874873121; Wed, 09 Mar 2022 17:14:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646874873; cv=none; d=google.com; s=arc-20160816; b=XWo60CtKIa8w+RpcuoimqFc5K5zuJTIxsYJFjhYsPhNnkC5OC30bUsWFTJ9kjjEpZF DhfZuC/Sg/BSxtecvwJfZ+A7S8ZFbTBIgtlkRdabinxrsyeK1bXyqMSTGKDXyow7P55g qsZws+6TZRXDjCcsQfIzFYOlWBUdPL5OXOOM5oufD6OIIOciE4zjLdOB2sfyWswTd1AI F95DOi75HMZdzbGzAlri/Yzk3eKPrZtHlKR/tAF04E1Q4AD1HCIkgayRxgvz2iqRvfxO diWYI16uhELS/E8aJPUhqrqM03ghlKiXCtYOl/qcJsg6nPNcx8hrhjqRbN3gOLASj10T 4uOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Lu69QDSnnpD/Z22OyKOxq3E/TJy8itENAcdmJWhz/dc=; b=xHWVdCV9c8wIagSwZDZyF/MvGYVlgAkyWSYhWXtiN4aRhsGQoh0xl/Tr+q1IRcbT+9 mhAa2UZxo130lgV3/s9indF1y3yZddWRTbufsTGIQmzIq15dQyjdZ31lZ+WMRZfKnQRW QAMmCBArBXo3R34uBE2Q/aD2CxzEe689SaX4Yel/wVgi3rkG8wOWrfBkpUvBnyrSVjwI DVDxmGhGPlXsumnP4soqqQGqldZnhBBzb+pTtsmFWpycDz19KoL+g5SRKZlz3P40YAdH H08YJGnRs+aZGum1KuO9vhBpnxIK2vN5JG4vumjlH98l3XJWbKGx/4u+ysB5Ifwxnbhz BJeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DnDofeAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 l9-20020a628809000000b004f654ba708esi3221611pfd.336.2022.03.09.17.14.14; Wed, 09 Mar 2022 17:14:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DnDofeAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234751AbiCIWHa (ORCPT + 99 others); Wed, 9 Mar 2022 17:07:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbiCIWH2 (ORCPT ); Wed, 9 Mar 2022 17:07:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50E1C101F06 for ; Wed, 9 Mar 2022 14:06:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DF04561B20 for ; Wed, 9 Mar 2022 22:06:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 196FFC340E8; Wed, 9 Mar 2022 22:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1646863588; bh=tCTg9iZ+l1L+YIDqIMzEn+ib+sAI8kfh/KLRU9a8GdY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DnDofeAkAHu7ywYFNpGq2nl3tLnncdXVE9rvFsKyBSNOIOJOafkOL8QwbSS0koDnB EQNB30prTqIQk3+HpHzIGRuDWGKWvLTwoQxbJSjYnMpd7r+DUF6ObJafeblDamGT+/ WS9QaikU/SW99qMzNydh5dTfD6RU571d84XqAqYY= Date: Wed, 9 Mar 2022 14:06:27 -0800 From: Andrew Morton To: Minchan Kim Cc: linux-mm , LKML , Chris Goldsworthy , Marcelo Tosatti , John Dias Subject: Re: [PATCH] mm: fs: fix lru_cache_disabled race in bh_lru Message-Id: <20220309140627.eeaa069daa921dbef64f8970@linux-foundation.org> In-Reply-To: <20220308180709.2017638-1-minchan@kernel.org> References: <20220308180709.2017638-1-minchan@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Tue, 8 Mar 2022 10:07:09 -0800 Minchan Kim wrote: > Check lru_cache_disabled under bh_lru_lock. Otherwise, it could > introduce race below and it fails to migrate pages containing > buffer_head. > > CPU 0 CPU 1 > > bh_lru_install > lru_cache_disable > lru_cache_disabled = false > atomic_inc(&lru_disable_count); > invalidate_bh_lrus_cpu of CPU 0 > bh_lru_lock > __invalidate_bh_lrus > bh_lru_unlock > bh_lru_lock > install the bh > bh_lru_unlock What are the user-visible runtime effects of this bug? Is a cc:stable needed? Should there be a reported-by? Thanks.