]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: Check error during inode btree iteration in xfs_bulkstat()
authorJan Kara <jack@suse.cz>
Wed, 29 Oct 2014 23:34:52 +0000 (10:34 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:40 +0000 (10:10 -0800)
commita1606786b627409d725ba211d6ac679006415ba4
treebe29e101c57c8234f8a6df32a8751522e7911c44
parentbf3017d073bfa205275bfadb912053e8160e06ba
xfs: Check error during inode btree iteration in xfs_bulkstat()

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 <jack@suse.cz>
Reviewed-by: Jie Liu <jeff.u.liu@gmail.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_itable.c