Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7135936pxb; Thu, 18 Feb 2021 02:19:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWNPf1AqFWrsr1DLZVPhdZkNmLfCj/e0G0YYq/JgQF4h6HUVh/kOPklnEEkqk7T+PMsAGI X-Received: by 2002:a17:907:3d8d:: with SMTP id he13mr1653631ejc.448.1613643588456; Thu, 18 Feb 2021 02:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613643588; cv=none; d=google.com; s=arc-20160816; b=dn3sZvavKB4DknRYQMcZOHEqX/GxgCqxBVYm435zYbrcCXFotyGmAmUSD6LXwKosM+ CvBqaD2qec1RIfN/Prp5jM4OCe+KFYbhEVu3/AMOmaUTdwnLEr/qcIcGSO+y2EbXIrIs 2YGxbU5LbAcO2TstVaXN+hoaKJxM2ldcDcN0dq7AoDgjIzuumMUXY0iYXcOOFmEUQh/+ VDOsGZQzzmud/u5XO/sYJLwBIndTlNJo2LsJCytPwlBme45wRSrmPYi5aHCqlB+DyECZ RMFW6s86w6dk7FvdNzL/AxY6K+bDO0QDpFtw0SjC1l1vz5rqIcEhBCXhkpRkWcSSh30e mSyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=qITM77ib8me1coUjqPze1ScFt/wEmW1jacCO8v8Gn+o=; b=dDnqjBNVph/8Gl44bRV8fXGN02sltuP6lq6MiDreZW+YTCotLvT+tO43zBEdEzPtm8 RT1X0IoPMfidW1XI+VdnUwN5DXNw7KZ0ZZJaK2KZ0j7WpTQlE3gUPHGnAuGmcbb7o+bP A3zNzA18kGPf0+81lRCygD2tHGB8UflKS+vaWT0hm7VdIxW5vKhtj2+87nx4A1S0NoVc YU+qc7wnK8b/tndWR563J+OWbefytzAlLe5P8pV6h3ZLqxrUajumYHLQvA3+kL7ROdcN QpfZHDyh0F0nrI6QwCz8NbSBEeTUOblwmX4mIvCFtlWrGIGeZjtCznhLfLRNh5M1E0I/ +yrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si3359326ejy.685.2021.02.18.02.19.24; Thu, 18 Feb 2021 02:19:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232128AbhBRKQb (ORCPT + 99 others); Thu, 18 Feb 2021 05:16:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:47946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbhBRJJd (ORCPT ); Thu, 18 Feb 2021 04:09:33 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0E386146D; Thu, 18 Feb 2021 09:08:14 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lCfIC-00EjTe-HJ; Thu, 18 Feb 2021 09:08:12 +0000 Date: Thu, 18 Feb 2021 09:08:12 +0000 Message-ID: <87czwxpwub.wl-maz@kernel.org> From: Marc Zyngier To: Greg KH Cc: Michael Walle , linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH] irqdomain: remove debugfs_file from struct irq_domain In-Reply-To: References: <20210217195717.13727-1-michael@walle.cc> <4e4d0479b935e60a53f75ef534086476@kernel.org> <5c527bfb6f3dfe31b5c25f29418306c6@walle.cc> <87czwys6s1.wl-maz@kernel.org> <8b4de9eae773a43b38f42c8ab6d9d23c@walle.cc> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: gregkh@linuxfoundation.org, michael@walle.cc, linux-kernel@vger.kernel.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2021 08:52:53 +0000, Greg KH wrote: [...] > Ok, how about this: > > > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c > index 2fcf66473436..86c7f0489620 100644 > --- a/fs/debugfs/inode.c > +++ b/fs/debugfs/inode.c > @@ -297,7 +297,7 @@ struct dentry *debugfs_lookup(const char *name, struct dentry *parent) > { > struct dentry *dentry; > > - if (IS_ERR(parent)) > + if (!debugfs_initialized() || IS_ERR_OR_NULL(name) || IS_ERR(parent)) > return NULL; > > if (!parent) > @@ -318,6 +318,9 @@ static struct dentry *start_creating(const char *name, struct dentry *parent) > if (!(debugfs_allow & DEBUGFS_ALLOW_API)) > return ERR_PTR(-EPERM); > > + if (!debugfs_initialized()) > + return ERR_PTR(-ENOENT); > + > pr_debug("creating file '%s'\n", name); > > if (IS_ERR(parent)) > That one boots correctly in a guest. Thanks, M. -- Without deviation from the norm, progress is not possible.