lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87czwxpwub.wl-maz@kernel.org>
Date:   Thu, 18 Feb 2021 09:08:12 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Michael Walle <michael@...le.cc>, linux-kernel@...r.kernel.org,
        tglx@...utronix.de
Subject: Re: [PATCH] irqdomain: remove debugfs_file from struct irq_domain

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ