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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F00E1C433F5 for ; Mon, 20 Sep 2021 12:54:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C30C610A0 for ; Mon, 20 Sep 2021 12:54:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9C30C610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 3EED9940008; Mon, 20 Sep 2021 08:54:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39EA66B0071; Mon, 20 Sep 2021 08:54:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 28D3D940008; Mon, 20 Sep 2021 08:54:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id 1B4696B006C for ; Mon, 20 Sep 2021 08:54:26 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D3DD68249980 for ; Mon, 20 Sep 2021 12:54:25 +0000 (UTC) X-FDA: 78607945290.37.672D3A6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf29.hostedemail.com (Postfix) with ESMTP id 75D919000257 for ; Mon, 20 Sep 2021 12:54:25 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 982B360F6B; Mon, 20 Sep 2021 12:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632142464; bh=+E3USFlAlQ9wVdWsGzy+HHEZMYE6FYf6ghB1RYfKU30=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=pnDSG/pHGMwB3kz5Insco1jTpQtb5uI2YUktumhZxYdKycl/gcUIXss6SiMfMPh3V a0fZFIxIMUW6jLSRbPmN6fkBRd38LPbdeWmcB67BOG/n+q92FiLtpfqYGqsBEkIl0s aoPcP9DqSPK1qP5I/P/1pAmV5gW8y9VnGcoak8bTlOdolypa2WL94JxcrqUURHJN4J BvSHXP3kgIcts029UoWcyLN0X/g1u3frVClgWNW7Kf3bvm+QuJWNWuwOWFnYI13a2B HDN/hAh53/ApveUuGLWQFVNODoZkqmVDbuc4FY8ZpTb+cqi65sicgPFfHiY+qVNSwn YmwX2LLIf41cA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 6304F5C07FE; Mon, 20 Sep 2021 05:54:24 -0700 (PDT) Date: Mon, 20 Sep 2021 05:54:24 -0700 From: "Paul E. McKenney" To: Christoph Hellwig Cc: Dave Chinner , Thomas Gleixner , Stephen Boyd , Andrew Morton , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Waiman Long , Al Viro , Jens Axboe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [syzbot] WARNING in __init_work Message-ID: <20210920125424.GG880162@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <000000000000423e0a05cc0ba2c4@google.com> <20210915161457.95ad5c9470efc70196d48410@linux-foundation.org> <163175937144.763609.2073508754264771910@swboyd.mtv.corp.google.com> <87sfy07n69.ffs@tglx> <20210920040336.GV2361455@dread.disaster.area> <20210920122846.GA16661@lst.de> <20210920123859.GE880162@paulmck-ThinkPad-P17-Gen-1> <20210920124557.GA18317@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210920124557.GA18317@lst.de> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 75D919000257 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="pnDSG/pH"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of "SRS0=pD0Q=OK=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=pD0Q=OK=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" X-Stat-Signature: i5msstsms6s68cytuio14a1p9tj14f9i X-HE-Tag: 1632142465-579138 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Sep 20, 2021 at 02:45:57PM +0200, Christoph Hellwig wrote: > On Mon, Sep 20, 2021 at 05:38:59AM -0700, Paul E. McKenney wrote: > > > Well, the block code already does a bdi_unregister in del_gendisk. > > > So if we end up freeing the whole device bdev with a registered bdi > > > something is badly going wrong. Unfortunately the log in this report > > > isn't much help on how we got there. IIRC syzbot will eventually spew > > > out a reproducer, so it might be worth to wait for that. > > > > If it does turn out that you need to block in an RCU callback, > > queue_rcu_work() can be helpful. This schedules a workqueue from the RCU > > callback, allowing the function passed to the preceding INIT_RCU_WORK() > > to block. > > In this case we really should not block here. The problem is that > we are hitting the strange bdi auto-unregister misfeature due to a bug > elsewhere. Which reminds that I have a patch series to remove this > auto unregistration which I need to bring bag once this is fixed. > > That being said queue_rcu_work would have been really useful in a few > places I touched in that past. Glad it helped elsewhere and apologies for the noise here! Thanx, Paul