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] [day] [month] [year] [list]
Date:	Mon, 11 Aug 2014 09:49:11 +0200
From:	Jan Kara <jack@...e.cz>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	jack@...e.cz, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] udf: avoid unneeded up_write when fail to add entry in
 ->symlink

On Sat 09-08-14 09:49:31, Chao Yu wrote:
> We have released the ->i_data_sem before invoking udf_add_entry(),
> so in following error path, we should not release this lock again.
  Good catch. I've merged the patch to my tree. Thanks.

							Honza

> 
> Signed-off-by: Chao Yu <chao2.yu@...sung.com>
> ---
>  fs/udf/namei.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/udf/namei.c b/fs/udf/namei.c
> index 9737cba..83a0600 100644
> --- a/fs/udf/namei.c
> +++ b/fs/udf/namei.c
> @@ -1014,7 +1014,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
>  
>  	fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err);
>  	if (!fi)
> -		goto out_no_entry;
> +		goto out_fail;
>  	cfi.icb.extLength = cpu_to_le32(sb->s_blocksize);
>  	cfi.icb.extLocation = cpu_to_lelb(iinfo->i_location);
>  	if (UDF_SB(inode->i_sb)->s_lvid_bh) {
> @@ -1036,6 +1036,7 @@ out:
>  
>  out_no_entry:
>  	up_write(&iinfo->i_data_sem);
> +out_fail:
>  	inode_dec_link_count(inode);
>  	iput(inode);
>  	goto out;
> -- 
> 2.0.1.474.g72c7794
> 
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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