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: <20100921185347.GA13785@shell>
Date:	Tue, 21 Sep 2010 14:53:47 -0400
From:	Valerie Aurora <vaurora@...hat.com>
To:	Andreas Gruenbacher <agruen@...e.de>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Miklos Szeredi <miklos@...redi.hu>,
	Christoph Hellwig <hch@...radead.org>,
	Nick Piggin <npiggin@...nel.dk>, linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 01/34] VFS: Make clone_mnt() and copy_tree() return error codes

On Mon, Sep 20, 2010 at 11:26:42PM +0200, Andreas Gruenbacher wrote:
> collect_mounts() now also returns error pointers instead of NULL upon
> failure:
> 
> diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
> index 46a57b5..898da28 100644
> --- a/kernel/audit_tree.c
> +++ b/kernel/audit_tree.c
> @@ -579,7 +579,7 @@ void audit_trim_trees(void)
>  
>  		root_mnt = collect_mounts(&path);
>  		path_put(&path);
> -		if (!root_mnt)
> +		if (IS_ERR(root_mnt))
>  			goto skip_it;
>  
>  		spin_lock(&hash_lock);
> @@ -651,8 +651,8 @@ int audit_add_tree_rule(struct audit_krule *rule)
>  		goto Err;
>  	mnt = collect_mounts(&path);
>  	path_put(&path);
> -	if (!mnt) {
> -		err = -ENOMEM;
> +	if (IS_ERR(mnt)) {
> +		err = PTR_ERR(mnt);
>  		goto Err;
>  	}
>  
> @@ -701,8 +701,8 @@ int audit_tag_tree(char *old, char *new)
>  		return err;
>  	tagged = collect_mounts(&path2);
>  	path_put(&path2);
> -	if (!tagged)
> -		return -ENOMEM;
> +	if (IS_ERR(tagged))
> +		return PTR_ERR(tagged);
>  
>  	err = kern_path(old, 0, &path1);
>  	if (err) {

Thanks for the fix, folded in.

-VAL
--
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