xfs_repair: set args.geo in longform_dir2_entry_check_data
PATCH 1/1 xfs_repair: set args.geo in longform_dir2_entry_check_data
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;
BOOMAddresses-Coverity-Id: 1298008
---
Have to wonder if there are more of these :(
repair/phase6.c +1 -0
@@ -1506,6 +1506,7 @@ longform_dir2_entry_check_data(int wantmagic;struct xfs_da_args da = { .dp = ip, + .geo = mp->m_dir_geo, };
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 13 lines · Eric Sandeen
Here's another one where we miss setting
da_args->geo:
longform_dir2_entry_check_datastruct 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
Quoted 5 lines
Addresses-Coverity-Id: 1298008
Signed-off-by Eric Sandeen <[email protected]>---
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.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 13 lines · Eric Sandeen
Here's another one where we miss setting
da_args->geo:
longform_dir2_entry_check_datastruct 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
Quoted 5 lines
Addresses-Coverity-Id: 1298008
Signed-off-by Eric Sandeen <[email protected]>---
Have to wonder if there are more of these :(
Spot-checking in userspace wasn't hard; doesn't look like there are any more.
kernelspace looks ok too.
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs