On Thu, 18 Feb 2021 08:52:53 +0000, Greg KH <gre...@linuxfoundation.org> 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.