xen/xen_initial_domain: check that xen_start_info is initialized
Since commit commit 4c071ee526
("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>
This commit is contained in:
parent
2e3d886028
commit
4ed5978bdd
@ -24,7 +24,7 @@ extern enum xen_domain_type xen_domain_type;
|
|||||||
#include <asm/xen/hypervisor.h>
|
#include <asm/xen/hypervisor.h>
|
||||||
|
|
||||||
#define xen_initial_domain() (xen_domain() && \
|
#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 */
|
#else /* !CONFIG_XEN_DOM0 */
|
||||||
#define xen_initial_domain() (0)
|
#define xen_initial_domain() (0)
|
||||||
#endif /* CONFIG_XEN_DOM0 */
|
#endif /* CONFIG_XEN_DOM0 */
|
||||||
|
Loading…
Reference in New Issue
Block a user