]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: range check ri_cnt when recovering log items
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 24 Sep 2022 12:56:43 +0000 (18:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:04:10 +0000 (11:04 +0200)
commit7f006fa74e602381705d1f00a267f91e4dfa0645
tree2fedbee539e94fc15814039b75111e8c783d340e
parentaa6c4c5c592a1e76759ebb38faff34401d5d7ee7
xfs: range check ri_cnt when recovering log items

commit c3499852fd93b969b5ef82700cade5dd2db2e68e upstream.

Range check the region counter when we're reassembling regions from log
items during log recovery.  In the old days ASSERT would halt the
kernel, but this isn't true any more so we have to make an explicit
error return.

Coverity-id: 1132508
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_log_recover.c