mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent
vgic_v3_its_free_domain may be called before vgic_v3_its_init_domain if the vGIC was failing to initalize itself. This means the list would be unitialized and result in a crash. Thankfully, we only allow ITS for the hardware domain. So the crash is not a security issue. Fix it by checking whether the list the NULL. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
146bb7e193
commit
dcc18294ff
1 file changed
+4
@@ -1548,6 +1548,10 @@ void vgic_v3_its_free_domain(struct domain *d)
|
||||
{
|
||||
struct virt_its *pos, *temp;
|
||||
|
||||
/* Cope with unitialized vITS */
|
||||
if ( list_head_is_null(&d->arch.vgic.vits_list) )
|
||||
return;
|
||||
|
||||
list_for_each_entry_safe( pos, temp, &d->arch.vgic.vits_list, vits_list )
|
||||
{
|
||||
list_del(&pos->vits_list);
|
||||
|
||||