[PATCH] xfs_repair: set args.geo in longform_dir2_entry_check_data

Dave Chinner david at fromorbit.com
Tue Aug 25 17:52:01 CDT 2015


On Tue, Aug 25, 2015 at 01:34:21PM -0500, Eric Sandeen wrote:
> Here's another one where we miss setting da_args->geo:
> 
> longform_dir2_entry_check_data
>         struct xfs_da_args      da = {
>                 .dp = ip,
> 		// .geo is unset
>         };
> ...
> 	libxfs_dir2_data_make_free(&da ...)
> 		xfs_dir2_data_make_free
> 			endptr = (char *)hdr + args->geo->blksize;
> 				BOOM
> 
> Addresses-Coverity-Id: 1298008
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
> ---
> 
> Have to wonder if there are more of these :(

A quick git grep shows 3 uses of the struct xfs_da_args outside
libxfs. longform_dir2_entry_check() is already fixed, this fixes
longform_dir2_entry_check_data(), and dir2_kill_block() still needs
fixing.

AFAICT all the libxfs/ usage is good.

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list