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:   Sun, 19 Apr 2020 15:55:15 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Luis Chamberlain <mcgrof@...nel.org>, axboe@...nel.dk,
        viro@...iv.linux.org.uk, gregkh@...uxfoundation.org,
        rostedt@...dmis.org, mingo@...hat.com, jack@...e.cz,
        ming.lei@...hat.com, nstange@...e.de, akpm@...ux-foundation.org
Cc:     mhocko@...e.com, yukuai3@...wei.com, linux-block@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/10] blktrace: move debugfs file creation to its own
 function

On 4/19/20 12:45 PM, Luis Chamberlain wrote:
> +static int blk_trace_create_debugfs_files(struct blk_user_trace_setup *buts,
> +					  struct dentry *dir,
> +					  struct blk_trace *bt)
> +{
> +	int ret = -EIO;
> +
> +	bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
> +					       &blk_dropped_fops);
> +
> +	bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);
> +
> +	bt->rchan = relay_open("trace", dir, buts->buf_size,
> +				buts->buf_nr, &blk_relay_callbacks, bt);
> +	if (!bt->rchan)
> +		return ret;
> +
> +	return 0;
> +}

How about adding IS_ERR() checks for the debugfs_create_file() return 
values?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ