Skip to content

Commit

Permalink
xen/xen_initial_domain: check that xen_start_info is initialized
Browse files Browse the repository at this point in the history
Since commit commit 4c071ee ("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>
  • Loading branch information
Stefano Stabellini authored and Konrad Rzeszutek Wilk committed Oct 3, 2012
1 parent 2e3d886 commit 4ed5978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/xen/xen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 4ed5978

Please sign in to comment.