Re: [PATCH 1/2] ARM: KVM: KVM_VCPU_GET_MSR_INDEX_LIST/KVM_GET_MSRS/KVM_SET_MSRS fixup

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

 



On Thu, Aug 16, 2012 at 6:47 AM, Rusty Russell <rusty.russell@xxxxxxxxxx> wrote:
> Callers expect it to return a bool; this way it always failed (but qemu
> ignored the failure, so didn't break obviously).
>
> Reported-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
> Signed-off-by: Rusty Russell <rusty.russell@xxxxxxxxxx>
>
> diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c
> index 7eeb94d..ede9310 100644
> --- a/arch/arm/kvm/coproc.c
> +++ b/arch/arm/kvm/coproc.c
> @@ -863,16 +863,16 @@ static u32 cp15_to_index(const struct coproc_reg *reg)
>         return val;
>  }
>
> -static int copy_reg_to_user(const struct coproc_reg *reg, u32 __user **uind)
> +static bool copy_reg_to_user(const struct coproc_reg *reg, u32 __user **uind)
>  {
>         if (!*uind)
> -               return 0;
> +               return true;
>
>         if (put_user(cp15_to_index(reg), *uind))
> -               return -EFAULT;
> +               return false;
>
>         (*uind)++;
> -       return 0;
> +       return true;
>  }
>
>  /* Assumed ordered tables, see kvm_coproc_table_init. */

applied
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux