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: <20150814141944.4172fee6c9d7ae02a6258c80@linux-foundation.org>
Date:	Fri, 14 Aug 2015 14:19:44 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Alexander Kuleshov <kuleshovmail@...il.com>
Cc:	Tony Luck <tony.luck@...el.com>, Pekka Enberg <penberg@...nel.org>,
	Mel Gorman <mgorman@...e.de>, Baoquan He <bhe@...hat.com>,
	Tang Chen <tangchen@...fujitsu.com>, Robin Holt <holt@....com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memblock: validate the creation of debugfs files

On Sat, 15 Aug 2015 01:03:31 +0600 Alexander Kuleshov <kuleshovmail@...il.com> wrote:

> Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>

There's no changelog.

> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -1692,16 +1692,34 @@ static const struct file_operations memblock_debug_fops = {
>  
>  static int __init memblock_init_debugfs(void)
>  {
> +	struct dentry *f;
>  	struct dentry *root = debugfs_create_dir("memblock", NULL);
>  	if (!root)
>  		return -ENXIO;
> -	debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
> -	debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
> +
> +	f = debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
> +	if (!f) {
> +		pr_err("Failed to create memory debugfs file\n");
> +		goto err_out;

Why?  Ignoring the debugfs API return values is standard practice.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ