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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Jul 2020 13:20:51 +0200
From:   Jan Kara <jack@...e.cz>
To:     Ritesh Harjani <riteshh@...ux.ibm.com>
Cc:     Chengguang Xu <cgxu519@...ernel.net>, jack@...e.com,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2: initialize quota info in ext2_xattr_set()

On Wed 08-07-20 16:22:01, Ritesh Harjani wrote:
> 
> 
> On 6/26/20 11:19 AM, Chengguang Xu wrote:
> > In order to correctly account/limit space usage, should initialize
> > quota info before calling quota related functions.
> 
> How did you encounter the problem?
> Any test case got hit?
> 
> > 
> > Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>
> 
> LGTM, feel free to add
> Reviewed-by: Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com>

Thanks. I've added the patch to my tree.

								Honza

> 
> 
> > ---
> >   fs/ext2/xattr.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
> > index 943cc469f42f..913e5c4921ec 100644
> > --- a/fs/ext2/xattr.c
> > +++ b/fs/ext2/xattr.c
> > @@ -437,6 +437,9 @@ ext2_xattr_set(struct inode *inode, int name_index, const char *name,
> >   	name_len = strlen(name);
> >   	if (name_len > 255 || value_len > sb->s_blocksize)
> >   		return -ERANGE;
> > +	error = dquot_initialize(inode);
> > +	if (error)
> > +		return error;
> >   	down_write(&EXT2_I(inode)->xattr_sem);
> >   	if (EXT2_I(inode)->i_file_acl) {
> >   		/* The inode already has an extended attribute block. */
> > 
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ