| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfs_db initialization |
| From: | Utako Kusaka <utako@xxxxxxxxxxxxxx> |
| Date: | Thu, 16 Nov 2006 13:54:26 +0900 |
| Sender: | xfs-bounce@xxxxxxxxxxx |
Hi,
This patch fixes the issue that xfs_db causes segmentation fault
when a corrupt file system is specified.
Signed-off-by: Utako Kusaka <utako@xxxxxxxxxxxxxx>
---
--- xfsprogs-2.8.15-orgn/libxfs/init.c 2006-10-18 01:10:14.000000000 +0900
+++ xfsprogs-2.8.15/libxfs/init.c 2006-11-16 10:03:18.575412805 +0900
@@ -595,8 +595,8 @@ libxfs_mount(
fprintf(stderr, _("%s: data size check failed\n"), progname);
if (!(flags & LIBXFS_MOUNT_DEBUGGER))
return NULL;
- }
- libxfs_putbuf(bp);
+ } else
+ libxfs_putbuf(bp);
if (mp->m_logdev && mp->m_logdev != mp->m_dev) {
d = (xfs_daddr_t) XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks);
@@ -610,7 +610,8 @@ libxfs_mount(
if (!(flags & LIBXFS_MOUNT_DEBUGGER))
return NULL;
}
- libxfs_putbuf(bp);
+ if (bp)
+ libxfs_putbuf(bp);
}
/* Initialize realtime fields in the mount structure */
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: SLES 9 x86: xfs_force_shutdown, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed mount, Jesper Juhl |
| Previous by Thread: | SLES 9 x86: xfs_force_shutdown, Dan Am |
| Next by Thread: | [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed mount, Jesper Juhl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |