From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] x86/domctl: Further fix to XEN_DOMCTL_[gs]etvcpuextstate Date: Fri, 6 Jun 2014 11:21:31 +0100 Message-ID: <1402050091-387-1-git-send-email-andrew.cooper3@citrix.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 Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org Do not clobber errors from certain codepaths. Clobbering of -EINVAL from failing "evc->size <= PV_XSAVE_SIZE(_xcr0_accum)" was a pre-existing bug. However, clobbering -EINVAL/-EFAULT from the get codepath was a bug unintentionally introduced by 090ca8c1 "x86/domctl: two functional fixes to XEN_DOMCTL_[gs]etvcpuextstate". Signed-off-by: Andrew Cooper CC: Jan Beulich --- The pre-posted version of 090ca8c1 also tried to fix the evc->size race condition and already had this "ret = 0" removed. I missed that hunk when stripping the fixes back, after deciding that the size race condition shouldn't be fixed. I should really see about making some hypercall regression tests, in some copious free time... --- xen/arch/x86/domctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 87af350..d927b59 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1277,8 +1277,6 @@ long arch_do_domctl( xfree(receive_buf); } - ret = 0; - vcpuextstate_out: if ( domctl->cmd == XEN_DOMCTL_getvcpuextstate ) copyback = 1; -- 1.7.10.4