projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e3d886
)
xen/xen_initial_domain: check that xen_start_info is initialized
author
Stefano Stabellini
<
[email protected]
>
Wed, 3 Oct 2012 17:08:52 +0000
(18:08 +0100)
committer
Konrad Rzeszutek Wilk
<
[email protected]
>
Wed, 3 Oct 2012 17:03:32 +0000
(13:03 -0400)
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 <
[email protected]
>
Acked-by: Ian Campbell <
[email protected]
>
Reported-by: Konrad Rzeszutek Wilk <
[email protected]
>
Signed-off-by: Konrad Rzeszutek Wilk <
[email protected]
>
include/xen/xen.h
patch
|
blob
|
history
diff --git
a/include/xen/xen.h
b/include/xen/xen.h
index 2c0d3a56c749c6145e07ef6537355bebd45a4c89..a74d4362c4f84aca7a7218162a6cdba7df385fff 100644
(file)
--- 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 */