Skip to content
Commit 9bf3d203 authored by Zhang Yi's avatar Zhang Yi Committed by Jan Kara
Browse files

quota: check block number when reading the block in quota file

The block number in the quota tree on disk should be smaller than the
v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be
allocating an 'allocated' block and that would lead to a loop in a tree,
which will probably trigger oops later. This patch adds a check for the
block number in the quota tree to prevent such potential issue.

Link: https://lore.kernel.org/r/20211008093821.1001186-2-yi.zhang@huawei.com


Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 64570fbc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment