summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_log_recover.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 071672969421..b82d5d4d2462 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;