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]
Message-ID: <20180715121507.GA17794@kroah.com>
Date:   Sun, 15 Jul 2018 14:15:07 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Georgi Djakov <georgi.djakov@...aro.org>
Cc:     linux-pm@...r.kernel.org, rjw@...ysocki.net, robh+dt@...nel.org,
        mturquette@...libre.com, khilman@...libre.com,
        abailon@...libre.com, vincent.guittot@...aro.org,
        skannan@...eaurora.org, bjorn.andersson@...aro.org,
        amit.kucheria@...aro.org, seansw@....qualcomm.com,
        daidavid1@...eaurora.org, evgreen@...omium.org, mka@...omium.org,
        mark.rutland@....com, lorenzo.pieralisi@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v6 3/8] interconnect: Add debugfs support

On Mon, Jul 09, 2018 at 06:50:59PM +0300, Georgi Djakov wrote:
> +static int __init icc_debugfs_init(void)
> +{
> +	struct dentry *file;
> +
> +	icc_debugfs_dir = debugfs_create_dir("interconnect", NULL);
> +	if (!icc_debugfs_dir) {
> +		pr_err("interconnect: error creating debugfs directory\n");
> +		return -ENODEV;
> +	}

You should never care about the return value of a debugfs call.  Just
ignore it and move on.

> +	file = debugfs_create_file("interconnect_summary", 0444,
> +				   icc_debugfs_dir, NULL, &icc_summary_fops);
> +	if (!file)
> +		return -ENODEV;

Again, do not check this.

Where do you remove this directory and file from the system when the
code shuts down?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ