Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9742bb93da27737fe490eab2af9fba1efa243dcb Commit: 9742bb93da27737fe490eab2af9fba1efa243dcb Parent: f71354bc3a96c657a70e36dcf980cbad6c9fc63f Author: Lachlan McIlroy <[EMAIL PROTECTED]> AuthorDate: Thu Jan 10 16:43:36 2008 +1100 Committer: Lachlan McIlroy <[EMAIL PROTECTED]> CommitDate: Thu Feb 7 18:20:58 2008 +1100
[XFS] prevent panic during log recovery due to bogus op_hdr length A problem was reported where a system panicked in log recovery due to a corrupt log record. The cause of the corruption is not known but this change will at least prevent a crash for this specific scenario. Log recovery definitely needs some more work in this area. SGI-PV: 974151 SGI-Modid: xfs-linux-melb:xfs-kern:30318a Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]> Signed-off-by: David Chinner <[EMAIL PROTECTED]> Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]> --- fs/xfs/xfs_log_recover.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 0716729..b82d5d4 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2912,7 +2912,12 @@ xlog_recover_process_data( xlog_recover_new_tid(&rhash[hash], tid, be64_to_cpu(rhead->h_lsn)); } else { - ASSERT(dp + be32_to_cpu(ohead->oh_len) <= lp); + if (dp + be32_to_cpu(ohead->oh_len) > lp) { + xlog_warn( + "XFS: xlog_recover_process_data: bad length"); + WARN_ON(1); + return (XFS_ERROR(EIO)); + } flags = ohead->oh_flags & ~XLOG_END_TRANS; if (flags & XLOG_WAS_CONT_TRANS) flags &= ~XLOG_CONTINUE_TRANS; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html