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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 4 Nov 2020 15:20:38 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     linux-usb@...r.kernel.org, Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        Andreas Noever <andreas.noever@...il.com>,
        Isaac Hazan <isaac.hazan@...el.com>,
        Lukas Wunner <lukas@...ner.de>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 06/10] thunderbolt: Create debugfs directory
 automatically for services

On Wed, Nov 04, 2020 at 05:00:26PM +0300, Mika Westerberg wrote:
> This allows service drivers to use it as parent directory if they need
> to add their own debugfs entries.
> 
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
>  drivers/thunderbolt/debugfs.c | 24 ++++++++++++++++++++++++
>  drivers/thunderbolt/tb.h      |  4 ++++
>  drivers/thunderbolt/xdomain.c |  3 +++
>  include/linux/thunderbolt.h   |  4 ++++
>  4 files changed, 35 insertions(+)
> 
> diff --git a/drivers/thunderbolt/debugfs.c b/drivers/thunderbolt/debugfs.c
> index ed65d2b13964..a80278fc50af 100644
> --- a/drivers/thunderbolt/debugfs.c
> +++ b/drivers/thunderbolt/debugfs.c
> @@ -691,6 +691,30 @@ void tb_switch_debugfs_remove(struct tb_switch *sw)
>  	debugfs_remove_recursive(sw->debugfs_dir);
>  }
>  
> +/**
> + * tb_service_debugfs_init() - Add debugfs directory for service
> + * @svc: Thunderbolt service pointer
> + *
> + * Adds debugfs directory for service.
> + */
> +void tb_service_debugfs_init(struct tb_service *svc)
> +{
> +	svc->debugfs_dir = debugfs_create_dir(dev_name(&svc->dev),
> +					      tb_debugfs_root);
> +}
> +
> +/**
> + * tb_service_debugfs_remove() - Remove service debugfs directory
> + * @svc: Thunderbolt service pointer
> + *
> + * Removes the previously created debugfs directory for @svc.
> + */
> +void tb_service_debugfs_remove(struct tb_service *svc)
> +{
> +	debugfs_remove(svc->debugfs_dir);

debugfs_remove_recursive() just to be safe that you really did clean
everything up?  As you aren't "owning" this directory here, you don't
know what will get added by some other patch :)

Other than that tiny nit, this series looks good to me, nice work.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ