aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorStefano Stabellini <Stefano.Stabellini@eu.citrix.com>2012-10-03 13:08:52 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-03 13:03:32 -0400
commit4ed5978bdd99114db7773cb3d78f2998bd17f694 (patch)
tree7d4cf90f362dfcda4fc7fbc7fca3baec433b1eb7 /include/xen
parent2e3d88602814e5fd5b88d5c73be3305060c473b6 (diff)
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 2c0d3a56c749..a74d4362c4f8 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -24,7 +24,7 @@ extern enum xen_domain_type xen_domain_type;
24#include <asm/xen/hypervisor.h> 24#include <asm/xen/hypervisor.h>
25 25
26#define xen_initial_domain() (xen_domain() && \ 26#define xen_initial_domain() (xen_domain() && \
27 xen_start_info->flags & SIF_INITDOMAIN) 27 xen_start_info && xen_start_info->flags & SIF_INITDOMAIN)
28#else /* !CONFIG_XEN_DOM0 */ 28#else /* !CONFIG_XEN_DOM0 */
29#define xen_initial_domain() (0) 29#define xen_initial_domain() (0)
30#endif /* CONFIG_XEN_DOM0 */ 30#endif /* CONFIG_XEN_DOM0 */