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: <8B6EE337-4C54-42C3-BB2C-5D191143FAC7@dilger.ca>
Date:   Mon, 2 Nov 2020 20:15:36 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc:     Theodore Ts'o <tytso@....edu>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>,
        Jan Kara <jack@...e.cz>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        Tao Ma <boyu.mt@...bao.com>
Subject: Re: [PATCH] ext4: unlock xattr_sem properly in
 ext4_inline_data_truncate()

On Nov 2, 2020, at 7:29 PM, Joseph Qi <joseph.qi@...ux.alibaba.com> wrote:
> 
> It takes xattr_sem to check inline data again but without unlock it
> in case not have. So unlock it before return.
> 
> Fixes: aef1c8513c1f ("ext4: let ext4_truncate handle inline data correctly")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Cc: Tao Ma <boyu.mt@...bao.com>
> Signed-off-by: Joseph Qi <joseph.qi@...ux.alibaba.com>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> ---
> fs/ext4/inline.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> index caa5147..b41512d 100644
> --- a/fs/ext4/inline.c
> +++ b/fs/ext4/inline.c
> @@ -1880,6 +1880,7 @@ int ext4_inline_data_truncate(struct inode *inode, int *has_inline)
> 
> 	ext4_write_lock_xattr(inode, &no_expand);
> 	if (!ext4_has_inline_data(inode)) {
> +		ext4_write_unlock_xattr(inode, &no_expand);
> 		*has_inline = 0;
> 		ext4_journal_stop(handle);
> 		return 0;
> --
> 1.8.3.1
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ