1
0
Fork 0

KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value

vgic_its_restore_cte returns +1 if the collection table entry
is valid and properly decoded. As a consequence, if the
collection table is fully filled with valid data that are
decoded without error, vgic_its_restore_collection_table()
returns +1. This is wrong.

Let's return 0 in that case.

Fixes: ea1ad53e1e (KVM: arm64: vgic-its: Collection table save/restore)
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
zero-colors
Eric Auger 2017-10-26 17:23:04 +02:00 committed by Christoffer Dall
parent b92382620e
commit f31b98b57f
1 changed files with 4 additions and 0 deletions

View File

@ -2264,6 +2264,10 @@ static int vgic_its_restore_collection_table(struct vgic_its *its)
gpa += cte_esz;
read += cte_esz;
}
if (ret > 0)
return 0;
return ret;
}