This is a note to let you know that I've just added the patch titled
xfs: Check error during inode btree iteration in xfs_bulkstat()
to the 3.17-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-check-error-during-inode-btree-iteration-in-xfs_bulkstat.patch
and it can be found in the queue-3.17 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 7a19dee116c8fae7ba7a778043c245194289f5a2 Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Thu, 30 Oct 2014 10:34:52 +1100
Subject: xfs: Check error during inode btree iteration in xfs_bulkstat()
From: Jan Kara <[email protected]>
commit 7a19dee116c8fae7ba7a778043c245194289f5a2 upstream.
xfs_bulkstat() doesn't check error return from xfs_btree_increment(). In
case of specific fs corruption that could result in xfs_bulkstat()
entering an infinite loop because we would be looping over the same
chunk over and over again. Fix the problem by checking the return value
and terminating the loop properly.
Coverity-id: 1231338
Signed-off-by: Jan Kara <[email protected]>
Reviewed-by: Jie Liu <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/xfs/xfs_itable.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -474,6 +474,10 @@ xfs_bulkstat(
*/
agino = r.ir_startino + XFS_INODES_PER_CHUNK;
error = xfs_btree_increment(cur, 0, &tmp);
+ if (error) {
+ end_of_ag = 1;
+ goto del_cursor;
+ }
cond_resched();
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.17/ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch
queue-3.17/evm-check-xattr-value-length-and-type-in-evm_inode_setxattr.patch
queue-3.17/scsi-fix-error-handling-in-scsi_ioctl_send_command.patch
queue-3.17/ext4-don-t-check-quota-format-when-there-are-no-quota-files.patch
queue-3.17/lib-bitmap.c-fix-undefined-shift-in-__bitmap_shift_-left-right.patch
queue-3.17/ext4-fix-oops-when-loading-block-bitmap-failed.patch
queue-3.17/vfs-fix-data-corruption-when-blocksize-pagesize-for-mmaped-data.patch
queue-3.17/xfs-check-error-during-inode-btree-iteration-in-xfs_bulkstat.patch
queue-3.17/ext4-fix-mmap-data-corruption-when-blocksize-pagesize.patch
queue-3.17/ext4-don-t-orphan-or-truncate-the-boot-loader-inode.patch
queue-3.17/mm-remove-false-warn_on-from-pagecache_isize_extended.patch
queue-3.17/rbd-fix-error-recovery-in-rbd_obj_read_sync.patch
queue-3.17/ext4-fix-overflow-when-updating-superblock-backups-after-resize.patch
queue-3.17/ext4-grab-missed-write_count-for-ext4_ioc_swap_boot.patch
queue-3.17/ima-check-xattr-value-length-and-type-in-the-ima_inode_setxattr.patch
queue-3.17/quota-properly-return-errors-from-dquot_writeback_dquots.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html