Re: FAILED: patch "[PATCH] MIPS: kvm: Fix ioctl error handling." failed to apply to 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 08, 2016 at 06:10:29AM -0800, Greg KH wrote:
> On Tue, Mar 08, 2016 at 02:01:08PM +0000, James Hogan wrote:
> > Hi Greg,
> > 
> > On Mon, Mar 07, 2016 at 12:39:08PM -0800, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> > > 
> > > The patch below does not apply to the 4.4-stable tree.
> > > If someone wants it applied there, or to any other stable or longterm
> > > tree, then please email the backport, including the original git commit
> > > id to <stable@xxxxxxxxxxxxxxx>.
> > 
> > I don't see any conflicts when this is applied to 4.4.4. Asside from the
> > hashes the cherry-picked commit is identical. Is it conflicting with
> > some other stable patch since then or something?
> 
> Try using patch, not 'cherry-pick' and see if it still applies.

$ git reset --hard HEAD~
HEAD is now at c252409a688a Linux 4.4.4
$ git show 887349f69f37e71e2a8bfbd743831625a0b2ff51 | patch -p1
patching file arch/mips/kvm/mips.c
$ git diff | cat
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
index b9b803facdbf..2683d04fdda5 100644
--- a/arch/mips/kvm/mips.c
+++ b/arch/mips/kvm/mips.c
@@ -702,7 +702,7 @@ static int kvm_mips_get_reg(struct kvm_vcpu *vcpu,
        } else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
                void __user *uaddr = (void __user *)(long)reg->addr;
 
-               return copy_to_user(uaddr, vs, 16);
+               return copy_to_user(uaddr, vs, 16) ? -EFAULT : 0;
        } else {
                return -EINVAL;
        }
@@ -732,7 +732,7 @@ static int kvm_mips_set_reg(struct kvm_vcpu *vcpu,
        } else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
                void __user *uaddr = (void __user *)(long)reg->addr;
 
-               return copy_from_user(vs, uaddr, 16);
+               return copy_from_user(vs, uaddr, 16) ? -EFAULT : 0;
        } else {
                return -EINVAL;
        }

Cheers
James

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]