summaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorStefano Stabellini <Stefano.Stabellini@eu.citrix.com>2012-10-03 18:08:52 +0100
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-03 13:03:32 -0400
commit4ed5978bdd99114db7773cb3d78f2998bd17f694 (patch)
tree7d4cf90f362dfcda4fc7fbc7fca3baec433b1eb7 /include/xen
parent2e3d88602814e5fd5b88d5c73be3305060c473b6 (diff)
downloadop-kernel-dev-4ed5978bdd99114db7773cb3d78f2998bd17f694.zip
op-kernel-dev-4ed5978bdd99114db7773cb3d78f2998bd17f694.tar.gz
xen/xen_initial_domain: check that xen_start_info is initialized
Since commit commit 4c071ee5268f7234c3d084b6093bebccc28cdcba ("arm: initial Xen support") PV on HVM guests can be xen_initial_domain. However PV on HVM guests might have an unitialized xen_start_info, so check before accessing its fields. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/xen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/xen/xen.h b/include/xen/xen.h
index 2c0d3a5..a74d436 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -24,7 +24,7 @@ extern enum xen_domain_type xen_domain_type;
#include <asm/xen/hypervisor.h>
#define xen_initial_domain() (xen_domain() && \
- xen_start_info->flags & SIF_INITDOMAIN)
+ xen_start_info && xen_start_info->flags & SIF_INITDOMAIN)
#else /* !CONFIG_XEN_DOM0 */
#define xen_initial_domain() (0)
#endif /* CONFIG_XEN_DOM0 */
OpenPOWER on IntegriCloud