From 0cfe6c8d6afd6fa4a2b73f0392962c6581e0403a Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Thu, 10 Jan 2008 16:43:36 +1100 Subject: [PATCH] --- yaml --- r: 84482 b: refs/heads/master c: 9742bb93da27737fe490eab2af9fba1efa243dcb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_log_recover.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 03538f048396..711724ae0ede 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f71354bc3a96c657a70e36dcf980cbad6c9fc63f +refs/heads/master: 9742bb93da27737fe490eab2af9fba1efa243dcb diff --git a/trunk/fs/xfs/xfs_log_recover.c b/trunk/fs/xfs/xfs_log_recover.c index 071672969421..b82d5d4d2462 100644 --- a/trunk/fs/xfs/xfs_log_recover.c +++ b/trunk/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;