Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345363

Re: [PATCH for-4,5] mips/kvm: fix ioctl error handling

From Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH for-4,5] mips/kvm: fix ioctl error handling
Date 2016-02-28 18:40 +0100
Message-ID <r7du3-5Yj-11@gated-at.bofh.it> (permalink)
References <r7bBU-4yM-13@gated-at.bofh.it>
Organization Cogent Embedded

Show all headers | View raw


Hello.

On 02/28/2016 06:35 PM, Michael S. Tsirkin wrote:

> Calling return copy_to_user(...) or return copy_from_user in an ioctl

    Calling return? Perhaps "returning the result of"?

> will not do the right thing if there's a pagefault:
> copy_to_user/copy_from_user return the number of bytes not copied in
> this case.
>
> Fix up kvm on mips to do
> 	return copy_to_user(...)) ?  -EFAULT : 0;
> and
> 	return copy_from_user(...)) ?  -EFAULT : 0;
>
> everywhere.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
[...]

MBR, Sergei

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH for-4,5] mips/kvm: fix ioctl error handling "Michael S. Tsirkin" <mst@redhat.com> - 2016-02-28 16:40 +0100
  Re: [PATCH for-4,5] mips/kvm: fix ioctl error handling Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-02-28 18:40 +0100
  Re: [PATCH for-4,5] mips/kvm: fix ioctl error handling Paolo Bonzini <pbonzini@redhat.com> - 2016-03-02 10:40 +0100

csiph-web