From patchwork Thu Dec 17 19:44:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Stevens X-Patchwork-Id: 68550 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixw3005715 for ; Fri, 18 Dec 2009 04:47:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965493AbZLQTp3 (ORCPT ); Thu, 17 Dec 2009 14:45:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965492AbZLQTp2 (ORCPT ); Thu, 17 Dec 2009 14:45:28 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:58693 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965491AbZLQTpZ (ORCPT ); Thu, 17 Dec 2009 14:45:25 -0500 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e35.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id nBHJWc0K002870 for ; Thu, 17 Dec 2009 12:32:38 -0700 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBHJj6Fv093492 for ; Thu, 17 Dec 2009 12:45:07 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nBHJiuWe015383 for ; Thu, 17 Dec 2009 12:44:57 -0700 Received: from d03nm121.boulder.ibm.com (d03nm121.boulder.ibm.com [9.17.195.147]) by d03av01.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nBHJiukL015367; Thu, 17 Dec 2009 12:44:56 -0700 To: mst@redhat.com, rusty@rustcorp.com.au Cc: kvm@vger.kernel.org MIME-Version: 1.0 Subject: [PATCH] fix vhost ioctl handling for 32-bit X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 Message-ID: From: David Stevens Date: Thu, 17 Dec 2009 12:44:55 -0700 X-MIMETrack: Serialize by Router on D03NM121/03/M/IBM(Release 8.0.1|February 07, 2008) at 12/17/2009 12:44:56 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org --- a/drivers/vhost/net.c 2009-11-17 22:51:56.000000000 -0800 +++ b/drivers/vhost/net.c 2009-12-17 11:31:51.000000000 -0800 @@ -563,7 +563,7 @@ { struct vhost_net *n = f->private_data; void __user *argp = (void __user *)arg; - u32 __user *featurep = argp; + u64 __user *featurep = (u64 __user *)argp; struct vhost_vring_file backend; u64 features; int r; @@ -577,7 +577,7 @@ features = VHOST_FEATURES; return put_user(features, featurep); case VHOST_SET_FEATURES: - r = get_user(features, featurep); + r = copy_from_user(&features, featurep, sizeof features); /* No features for now */ if (r < 0) return r;