From: Vitaly Kuznetsov Subject: [PATCH] Reset runstate_guest handles on soft reset Date: Thu, 28 Jan 2016 10:34:16 +0100 Message-ID: <1453973656-17286-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Keir Fraser , Ian Jackson , Ian Campbell , Jan Beulich , Tim Deegan List-Id: xen-devel@lists.xenproject.org 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 --- xen/common/domain.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index 2979c1b..6b2b7dc 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 ) + { + memset(&runstate_guest(v), 0, sizeof(runstate_guest(v))); unmap_vcpu_info(v); + } rc = arch_domain_soft_reset(d); if ( !rc ) -- 2.5.0