From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com ([74.125.82.50]:34190 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbcB2I2J (ORCPT ); Mon, 29 Feb 2016 03:28:09 -0500 Received: by mail-wm0-f50.google.com with SMTP id p65so57528514wmp.1 for ; Mon, 29 Feb 2016 00:28:08 -0800 (PST) Date: Mon, 29 Feb 2016 09:29:14 +0100 From: Christoffer Dall To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Marc Zyngier , Paolo Bonzini , Russell King , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH for-4.5] arm/kvm: fix ioctl error handling Message-ID: <20160229082914.GA3471@cbox> References: <1456673397-23625-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456673397-23625-1-git-send-email-mst@redhat.com> Sender: stable-owner@vger.kernel.org List-ID: On Sun, Feb 28, 2016 at 05:32:07PM +0200, Michael S. Tsirkin wrote: > Calling return copy_to_user(...) in an ioctl will not > do the right thing if there's a pagefault: > copy_to_user returns the number of bytes not copied > in this case. > > Fix up kvm to do > return copy_to_user(...)) ? -EFAULT : 0; > > everywhere. > > Cc: stable@vger.kernel.org > Signed-off-by: Michael S. Tsirkin Acked-by: Christoffer Dall