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: <20110511161808.GK5057@quack.suse.cz>
Date:	Wed, 11 May 2011 18:18:08 +0200
From:	Jan Kara <jack@...e.cz>
To:	Manish Katiyar <mkatiyar@...il.com>
Cc:	ext4 <linux-ext4@...r.kernel.org>,
	Manish Katiyar <manish.katiyar@...ibm.com>,
	Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH 4/5] ext4 : Add missing posix_acl_release() in
 ext4_xattr_set_acl() in error path.

On Sun 24-04-11 17:18:02, Manish Katiyar wrote:
> This patch fixes the following.
> 
> a) Incase journal transaction allocation fails due to ENOMEM don't call
> ext4_std_error() since it will remount the fs as readonly and logs the
> message in kernel log.
> b) Call posix_acl_release() incase journal allocation fails in case of
> error paths.
> 
> 
> Signed-off-by: Manish Katiyar <mkatiyar@...il.com>
> ---
>  fs/ext4/acl.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
> index 21eacd7..0c98710 100644
> --- a/fs/ext4/acl.c
> +++ b/fs/ext4/acl.c
> @@ -354,7 +354,6 @@ ext4_acl_chmod(struct inode *inode)
>  				EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
>  		if (IS_ERR(handle)) {
>  			error = PTR_ERR(handle);
> -			ext4_std_error(inode->i_sb, error);
  The changelog speaks only about ENOMEM but you actually remove the
message completely (so it won't catch EIO or similar errors). I think you
should just condition ext4_std_error() with if (error != ENOMEM).

>  			goto out;
>  		}
>  		error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, clone);
> @@ -450,8 +449,10 @@ ext4_xattr_set_acl(struct dentry *dentry, const
> char *name, const void *value,
> 
>  retry:
>  	handle = ext4_journal_start(inode, EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
> -	if (IS_ERR(handle))
> -		return PTR_ERR(handle);
> +	if (IS_ERR(handle)) {
> +		error = PTR_ERR(handle);
> +		goto release_and_out;
> +	}
>  	error = ext4_set_acl(handle, inode, type, acl);
>  	ext4_journal_stop(handle);
>  	if (error == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ