* [PATCH v2] Reset runstate_guest handles on soft reset
@ 2016-01-28 13:31 Vitaly Kuznetsov
0 siblings, 0 replies; only message in thread
From: Vitaly Kuznetsov @ 2016-01-28 13:31 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Ian Jackson, Ian Campbell, Jan Beulich, Tim Deegan
runstate_guest handles need to be reset to prevent update_runstate_area()
corrupting guest's memory after we resume the guest.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
Changes since v1:
- use set_xen_guest_handle() instead of raw memset() [Jan Beulich]
---
xen/common/domain.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 2979c1b..603b718 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -1074,7 +1074,10 @@ int domain_soft_reset(struct domain *d)
grant_table_warn_active_grants(d);
for_each_vcpu ( d, v )
+ {
+ set_xen_guest_handle(runstate_guest(v), NULL);
unmap_vcpu_info(v);
+ }
rc = arch_domain_soft_reset(d);
if ( !rc )
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-28 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-28 13:31 [PATCH v2] Reset runstate_guest handles on soft reset Vitaly Kuznetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).