Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp507887iog; Wed, 15 Jun 2022 06:50:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s5q9rrqafAni7VWtwLjN+SFAxKV0+nLFIn8/jv3XNBPvQRuawz/HOL1sx0kuv9T7TDDyix X-Received: by 2002:a17:90b:4c4a:b0:1e3:3b3:8800 with SMTP id np10-20020a17090b4c4a00b001e303b38800mr10679185pjb.6.1655301032214; Wed, 15 Jun 2022 06:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655301032; cv=none; d=google.com; s=arc-20160816; b=Gn+ptyW6/cFPz0xMJOrm91k6WeBmFUxCDZKlWAnKjNDtxbKs8b8xmar+I9UpaGy66v oH57iuUWnmDiMam0TUyrSiOTnzRTwBl+Lr9PvXQXt+T9LaYhdZauDec43+0GFYf71jiZ ytqPumv4s7hW/oajQ1yiP+d8OEpyBx6NWFyrObJYQkTkUEhp8YsMk9jXCxtgtOlwPKiI D6ni4+glmhrK54ylscUHLOGB7icW5kbOofbs97G3V1zpfw/zExGyabrwx07jZCLLw5f1 CJn9w33PAciDlhDqkM9lRwcnKfGwv64OhrXxUs3JubHjvGGx48sN50kBZeZHCT6kgAzV WCRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=cRf509T1oRK4yAOPZ+TH87cWnsf7bqUhAO6sxp3Z7Zo=; b=LBUXe/O9DSSLTAScX9bAYOhsAsgaj2iBByJyx3K3jnUWJh3Dbl9iVtBk6Zv86DJvvA t0fIYlpgC0KRHwEdXWrp2m28/WTjgVmTk5STF6Knx/UUflrwsSuuaVLjlAny2KJQTCAS 5USjup2KqjBUCQQhwDqyniIx+UHCDttRY4mtbqQH2JDw2xq62cHYjuYxeGXk6QoeFrg6 hNGqG1plzp5ctWCezkXbseJAh1Yxj0z5+i+IJrNW4kXbWlh45SFmMi+XRqyT4MD8z6AO 0C3NTAQQwnV56Oo6RBx33hAxmUrUGx2+ZBzDWEIb2ylr0taljN2CfYyJQEtC3tCuXsjw /VWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=X1S4Mz1m; dkim=neutral (no key) header.i=@suse.cz header.b=NIAAOy1v; 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 f10-20020a170902ce8a00b00158f777bbbfsi18979160plg.559.2022.06.15.06.50.17; Wed, 15 Jun 2022 06:50:32 -0700 (PDT) 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=@suse.cz header.s=susede2_rsa header.b=X1S4Mz1m; dkim=neutral (no key) header.i=@suse.cz header.b=NIAAOy1v; 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 S1354058AbiFONi4 (ORCPT + 99 others); Wed, 15 Jun 2022 09:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242679AbiFONiy (ORCPT ); Wed, 15 Jun 2022 09:38:54 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50B4B31DCA; Wed, 15 Jun 2022 06:38:53 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DEFAA21C44; Wed, 15 Jun 2022 13:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1655300331; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cRf509T1oRK4yAOPZ+TH87cWnsf7bqUhAO6sxp3Z7Zo=; b=X1S4Mz1monIEhnTtE3x88V5SVsE69r9OWioCNaGfHuO1FH+mnzMStVf+pOrMWHhDZnxazQ QCoUiCNJ9u5XI78g/1gfJx5X4SsK+T2ErCBWP2eejjIsYNqbXAsLWspLf4Z3FZZ+tNPmMp 3qxGm1PnKritPJJ0o+XgSDDoYNcOXDE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1655300331; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cRf509T1oRK4yAOPZ+TH87cWnsf7bqUhAO6sxp3Z7Zo=; b=NIAAOy1v2YauB5LGrIoivNNpjoGUmuQJt9B02jRf2xN6ETIWJxkousWtqmX5eWEY++Qu+3 yMEcVJY11LIMohCQ== Received: from quack3.suse.cz (unknown [10.163.28.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9B2672C141; Wed, 15 Jun 2022 13:38:51 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id BAF43A062E; Wed, 15 Jun 2022 15:38:45 +0200 (CEST) Date: Wed, 15 Jun 2022 15:38:45 +0200 From: Jan Kara To: Linus Torvalds Cc: Thomas Backlund , Jan Kara , Suzuki K Poulose , Greg Kroah-Hartman , Guenter Roeck , Linux Kernel Mailing List , stable , Andrew Morton , Shuah Khan , patches@kernelci.org, lkft-triage@lists.linaro.org, Pavel Machek , Jon Hunter , Florian Fainelli , Sudip Mukherjee , Slade Watkins Subject: Re: [PATCH 5.15 000/251] 5.15.47-rc2 review Message-ID: <20220615133845.o2lzfe5s4dzdfvtg@quack3.lan> References: <20220615110022.yifrsvzxjsz2wky5@quack3.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3vfcndmpumrrlvst" Content-Disposition: inline In-Reply-To: <20220615110022.yifrsvzxjsz2wky5@quack3.lan> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 --3vfcndmpumrrlvst Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed 15-06-22 13:00:22, Jan Kara wrote: > On Tue 14-06-22 12:00:22, Linus Torvalds wrote: > > On Tue, Jun 14, 2022 at 11:51 AM Linus Torvalds > > wrote: > > > > > > Or just make sure that noop_backing_dev_info is fully initialized > > > before it's used. > > > > I don't see any real reason why that > > > > err = bdi_init(&noop_backing_dev_info); > > > > couldn't just be done very early. Maybe as the first call in > > driver_init(), before the whole devtmpfs_init() etc. > > I've checked the dependencies and cgroups (which are the only non-trivial > dependency besides per-CPU infrastructure) are initialized early enough so > it should work fine. So let's try that. Attached patch boots for me. Guys, who was able to reproduce the failure: Can you please confirm this patch fixes your problem? Honza -- Jan Kara SUSE Labs, CR --3vfcndmpumrrlvst Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="0001-init-Initialized-noop_backing_dev_info-early.patch" From 8f998b182be7563fc92aa8914cc7d21f75a3c20e Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 15 Jun 2022 15:22:29 +0200 Subject: [PATCH] init: Initialized noop_backing_dev_info early noop_backing_dev_info is used by superblocks of various pseudofilesystems such as kdevtmpfs. Initialize it before the filesystems get mounted. Signed-off-by: Jan Kara --- drivers/base/init.c | 2 ++ include/linux/backing-dev.h | 2 ++ mm/backing-dev.c | 11 ++--------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/base/init.c b/drivers/base/init.c index d8d0fe687111..397eb9880cec 100644 --- a/drivers/base/init.c +++ b/drivers/base/init.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "base.h" @@ -20,6 +21,7 @@ void __init driver_init(void) { /* These are the core pieces */ + bdi_init(&noop_backing_dev_info); devtmpfs_init(); devices_init(); buses_init(); diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 2bd073fa6bb5..f0baef68f90f 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -119,6 +119,8 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); extern struct backing_dev_info noop_backing_dev_info; +extern int bdi_init(struct backing_dev_info *bdi); + /** * writeback_in_progress - determine whether there is writeback in progress * @wb: bdi_writeback of interest diff --git a/mm/backing-dev.c b/mm/backing-dev.c index ff60bd7d74e0..95550b8fa7fe 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -231,20 +231,13 @@ static __init int bdi_class_init(void) } postcore_initcall(bdi_class_init); -static int bdi_init(struct backing_dev_info *bdi); - static int __init default_bdi_init(void) { - int err; - bdi_wq = alloc_workqueue("writeback", WQ_MEM_RECLAIM | WQ_UNBOUND | WQ_SYSFS, 0); if (!bdi_wq) return -ENOMEM; - - err = bdi_init(&noop_backing_dev_info); - - return err; + return 0; } subsys_initcall(default_bdi_init); @@ -781,7 +774,7 @@ static void cgwb_remove_from_bdi_list(struct bdi_writeback *wb) #endif /* CONFIG_CGROUP_WRITEBACK */ -static int bdi_init(struct backing_dev_info *bdi) +int bdi_init(struct backing_dev_info *bdi) { int ret; -- 2.35.3 --3vfcndmpumrrlvst--