lkml.org 
[lkml]   [2021]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] irqdomain: remove debugfs_file from struct irq_domain
On Thu, 18 Feb 2021 08:52:53 +0000,
Greg KH <gregkh@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.
\
 
 \ /
  Last update: 2021-02-18 11:39    [W:0.573 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site