Re: [PATCH 3/9] xfs: validate attr leaf buffer owners

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  	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..

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux