[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-xfs
Subject:    Re: [PATCH 3/9] xfs: validate attr leaf buffer owners
From:       "Darrick J. Wong" <djwong () kernel ! org>
Date:       2024-02-28 17:41:39
Message-ID: 20240228174139.GJ1927156 () frogsfrogsfrogs
[Download RAW message or body]

On Wed, Feb 28, 2024 at 07:57:28AM -0800, Christoph Hellwig wrote:
> >  	trace_xfs_attr_node_list(context);
> > @@ -330,6 +339,15 @@ xfs_attr_node_list(
> >  			case XFS_ATTR_LEAF_MAGIC:
> >  			case XFS_ATTR3_LEAF_MAGIC:
> >  				leaf = bp->b_addr;
> > +				fa = xfs_attr3_leaf_header_check(bp,
> > +						dp->i_ino);
> > +				if (fa) {
> > +					__xfs_buf_mark_corrupt(bp, fa);
> > +					xfs_trans_brelse(context->tp, bp);
> > +					xfs_dirattr_mark_sick(dp, XFS_ATTR_FORK);
> 
> Nit: overly long line here.
> 
> Note: this function would really benefit from factoring out the
> body inside the "if (bp)" into a helper to make it more readable..

Done.

> Otherwise looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks!

--D

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic