From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: andre.przywara@arm.com, Julien Grall <julien.grall@arm.com>,
sstabellini@kernel.org, shameerali.kolothum.thodi@huawei.com,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH 3/3] xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent
Date: Tue, 4 Sep 2018 20:21:53 +0100 [thread overview]
Message-ID: <20180904192153.17210-4-julien.grall@arm.com> (raw)
In-Reply-To: <20180904192153.17210-1-julien.grall@arm.com>
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>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
xen/arch/arm/vgic-v3-its.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c
index 32061c6b03..9edd97c4e7 100644
--- a/xen/arch/arm/vgic-v3-its.c
+++ b/xen/arch/arm/vgic-v3-its.c
@@ -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);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-09-04 19:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 19:21 [PATCH 0/3] xen/arm: vgic-v3: Bug fixes Julien Grall
2018-09-04 19:21 ` [PATCH 1/3] [not-for-unstable] xen/arm: vgic-v3: Delay the initialization of the domain information Julien Grall
2018-09-04 19:35 ` Julien Grall
2018-09-04 19:53 ` Andrew Cooper
2018-09-05 13:25 ` Julien Grall
2018-09-25 20:45 ` Stefano Stabellini
2018-09-26 20:14 ` Julien Grall
2018-09-27 23:11 ` Stefano Stabellini
2018-09-28 20:35 ` Julien Grall
2018-09-28 23:38 ` Andrew Cooper
2018-09-28 23:45 ` Stefano Stabellini
2018-09-28 23:48 ` Andrew Cooper
2018-10-01 9:43 ` Julien Grall
2018-10-01 9:53 ` Andrew Cooper
2018-10-01 11:31 ` Julien Grall
2018-09-04 19:21 ` [PATCH 2/3] xen/arm: vgic-v3: Don't create empty re-distributor regions Julien Grall
2018-09-25 20:38 ` Stefano Stabellini
2018-09-26 20:36 ` Julien Grall
2018-09-27 23:34 ` Stefano Stabellini
2018-09-28 20:37 ` Julien Grall
2018-09-28 23:46 ` Stefano Stabellini
2018-09-04 19:21 ` Julien Grall [this message]
2018-09-25 20:08 ` [PATCH 3/3] xen/arm: vgic-v3-its: Make vgic_v3_its_free_domain idempotent Stefano Stabellini
2018-09-06 15:49 ` [PATCH 0/3] xen/arm: vgic-v3: Bug fixes Shameerali Kolothum Thodi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180904192153.17210-4-julien.grall@arm.com \
--to=julien.grall@arm.com \
--cc=andre.przywara@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).