| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfs_repair: set args.geo in dir2_kill_block |
| From: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
| Date: | Thu, 23 Jul 2015 15:14:56 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
This path in xfs_repair:
dir2_kill_block
libxfs_da_shrink_inode
xfs_dir2_shrink_inode
xfs_dir2_db_to_da
segfaults, because dir2_kill_block() does not initialize
args.geo, and a null geometry winds up in xfs_dir2_db_to_da(),
which dereferences it.
Fix that.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
diff --git a/repair/phase6.c b/repair/phase6.c
index de445c6..0c952ed 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -1438,6 +1438,7 @@ dir2_kill_block(
args.firstblock = &firstblock;
args.flist = &flist;
args.whichfork = XFS_DATA_FORK;
+ args.geo = mp->m_dir_geo;
if (da_bno >= mp->m_dir_geo->leafblk && da_bno < mp->m_dir_geo->freeblk)
error = -libxfs_da_shrink_inode(&args, da_bno, bp);
else
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH RFC 2/2] xfs: fix efi/efd error handling to avoid fs shutdown hangs, Brian Foster |
|---|---|
| Next by Date: | Re: [RFC PATCH] block: xfs: dm thin: train XFS to give up on retrying IO if thinp is out of space, Dave Chinner |
| Previous by Thread: | [PATCH RFC 0/2] xfs: fix up EFI/EFD error handling, Brian Foster |
| Next by Thread: | Re: [PATCH] xfs_repair: set args.geo in dir2_kill_block, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |