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]
Message-ID: <7d5r3gf4drcyraiahnuwo6ia5czursu2s6bd4jo4fcizhgwqhk@6qwnh7kn53qz>
Date: Mon, 2 Sep 2024 16:25:52 +0800
From: Yiyang Wu <toolmanp@...p.cc>
To: Gao Xiang <hsiangkao@...ux.alibaba.com>
Cc: linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 2/2] erofs: refactor read_inode calling convention

On Mon, Sep 02, 2024 at 04:12:31PM GMT, Gao Xiang wrote:
> 
> 
> > +static int erofs_read_inode(struct inode *inode)
> >   {
> >   	struct super_block *sb = inode->i_sb;
> >   	struct erofs_sb_info *sbi = EROFS_SB(sb);
> > @@ -20,20 +45,21 @@ static void *erofs_read_inode(struct erofs_buf *buf,
> >   	struct erofs_inode_compact *dic;
> >   	struct erofs_inode_extended *die, *copied = NULL;
> >   	union erofs_inode_i_u iu;
> > -	unsigned int ifmt;
> > -	int err;
> > +	struct erofs_buf buf;
> 
> Should be
> 	struct erofs_buf buf = __EROFS_BUF_INITIALIZER;
> 
> Otherwise buf itself will be left uninitialized.
> 

My bad, i forget this when rebasing. will be fixed in next version.

> >   		inode_nohighmem(inode);
> >   		break;
> >   	case S_IFCHR:
> > @@ -269,7 +266,6 @@ static int erofs_fill_inode(struct inode *inode)
> >   #endif
> >   	}
> >   out_unlock:
> 
> I mean since `return err` is the only useful statement for
> label `out_unlock`.
> 
> You could just remove it entirely and replace all
> `goto out_unlock` to `return err`;
> 
> the name `out_unlock` itself is also meaningless due to
> this patch.
> 
> Thanks,
> Gao Xiang
> 
> > -	erofs_put_metabuf(&buf);
> >   	return err;
> >   }
> 
Got it, will be fixed in next version.

Best Regards,
Yiyang Wu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ