From patchwork Fri Mar 12 00:45:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 85169 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2C0hvoC000420 for ; Fri, 12 Mar 2010 00:43:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432Ab0CLAny (ORCPT ); Thu, 11 Mar 2010 19:43:54 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:51564 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752324Ab0CLAnx (ORCPT ); Thu, 11 Mar 2010 19:43:53 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 7073217011B; Fri, 12 Mar 2010 08:43:52 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o2C0gilT019490; Fri, 12 Mar 2010 08:42:44 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 364D1D48A5; Fri, 12 Mar 2010 08:46:02 +0800 (CST) Message-ID: <4B998EB3.1060608@cn.fujitsu.com> Date: Fri, 12 Mar 2010 08:45:39 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: kvm@vger.kernel.org, Avi Kivity Subject: [PATCH] KVM: ia64: fix the error code of ioctl KVM_IA64_VCPU_GET_STACK failure Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 12 Mar 2010 00:43:58 +0000 (UTC) diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 26e0e08..bc07c81 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c @@ -1535,8 +1535,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp, goto out; if (copy_to_user(user_stack, stack, - sizeof(struct kvm_ia64_vcpu_stack))) + sizeof(struct kvm_ia64_vcpu_stack))) { + r = -EFAULT; goto out; + } break; }