lkml.org 
[lkml]   [2016]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH for-4.5] arm/kvm: fix ioctl error handling
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 <mst@redhat.com>

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

\
 
 \ /
  Last update: 2016-02-29 10:21    [W:0.041 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site