Patch "xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-fix-the-forward-progress-assertion-in-xfs_iwalk_run_callbacks.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From chandan.babu@xxxxxxxxxx Thu Feb 16 06:23:20 2023
From: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Date: Thu, 16 Feb 2023 10:50:17 +0530
Subject: xfs: fix the forward progress assertion in xfs_iwalk_run_callbacks
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: sashal@xxxxxxxxxx, mcgrof@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, djwong@xxxxxxxxxx, chandan.babu@xxxxxxxxxx, amir73il@xxxxxxxxx, leah.rumancik@xxxxxxxxx
Message-ID: <20230216052019.368896-24-chandan.babu@xxxxxxxxxx>

From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>

commit a5336d6bb2d02d0e9d4d3c8be04b80b8b68d56c8 upstream.

In commit 27c14b5daa82 we started tracking the last inode seen during an
inode walk to avoid infinite loops if a corrupt inobt record happens to
have a lower ir_startino than the record preceeding it.  Unfortunately,
the assertion trips over the case where there are completely empty inobt
records (which can happen quite easily on 64k page filesystems) because
we advance the tracking cursor without actually putting the empty record
into the processing buffer.  Fix the assert to allow for this case.

Reported-by: zlang@xxxxxxxxxx
Fixes: 27c14b5daa82 ("xfs: ensure inobt record walks always make forward progress")
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Reviewed-by: Zorro Lang <zlang@xxxxxxxxxx>
Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/xfs/xfs_iwalk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/xfs/xfs_iwalk.c
+++ b/fs/xfs/xfs_iwalk.c
@@ -362,7 +362,7 @@ xfs_iwalk_run_callbacks(
 	/* Delete cursor but remember the last record we cached... */
 	xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0);
 	irec = &iwag->recs[iwag->nr_recs - 1];
-	ASSERT(next_agino == irec->ir_startino + XFS_INODES_PER_CHUNK);
+	ASSERT(next_agino >= irec->ir_startino + XFS_INODES_PER_CHUNK);
 
 	error = xfs_iwalk_ag_recs(iwag);
 	if (error)


Patches currently in stable-queue which might be from chandan.babu@xxxxxxxxxx are

queue-5.4/xfs-remove-the-xfs_efd_log_item_t-typedef.patch
queue-5.4/xfs-change-the-order-in-which-child-and-parent-defer-ops-are-finished.patch
queue-5.4/xfs-refactor-xfs_defer_finish_noroll.patch
queue-5.4/xfs-sync-lazy-sb-accounting-on-quiesce-of-read-only-mounts.patch
queue-5.4/xfs-clean-up-xfs_bui_item_recover-iget-trans_alloc-ilock-ordering.patch
queue-5.4/xfs-xfs_defer_capture-should-absorb-remaining-block-reservations.patch
queue-5.4/xfs-factor-out-a-xfs_defer_create_intent-helper.patch
queue-5.4/xfs-turn-dfp_intent-into-a-xfs_log_item.patch
queue-5.4/xfs-fix-finobt-btree-block-recovery-ordering.patch
queue-5.4/xfs-xfs_defer_capture-should-absorb-remaining-transaction-reservation.patch
queue-5.4/xfs-merge-the-diff_items-defer-op-into-create_intent.patch
queue-5.4/xfs-prevent-uaf-in-xfs_log_item_in_current_chkpt.patch
queue-5.4/xfs-fix-missing-cow-blocks-writeback-conversion-retry.patch
queue-5.4/xfs-remove-the-xfs_efi_log_item_t-typedef.patch
queue-5.4/xfs-only-relog-deferred-intent-items-if-free-space-in-the-log-gets-low.patch
queue-5.4/xfs-proper-replay-of-deferred-ops-queued-during-log-recovery.patch
queue-5.4/xfs-clean-up-bmap-intent-item-recovery-checking.patch
queue-5.4/xfs-fix-the-forward-progress-assertion-in-xfs_iwalk_run_callbacks.patch
queue-5.4/xfs-log-new-intent-items-created-as-part-of-finishing-recovered-intent-items.patch
queue-5.4/xfs-ensure-inobt-record-walks-always-make-forward-progress.patch
queue-5.4/xfs-remove-the-xfs_inode_log_item_t-typedef.patch
queue-5.4/xfs-fix-an-incore-inode-uaf-in-xfs_bui_recover.patch
queue-5.4/xfs-expose-the-log-push-threshold.patch
queue-5.4/xfs-periodically-relog-deferred-intent-items.patch
queue-5.4/xfs-merge-the-log_item-defer-op-into-create_intent.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux