All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: mtosatti@redhat.com, gleb@redhat.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, yongjun_wei@trendmicro.com.cn,
	x86@kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: fix error return code in kvm_arch_vcpu_init()
Date: Thu, 18 Apr 2013 10:23:37 +0200	[thread overview]
Message-ID: <516FAD89.4060005@redhat.com> (raw)
In-Reply-To: <CAPgLHd9W2bu9GkK=4TsK6KBh6LmvitaUpuc2XXnDDSj15U9drg@mail.gmail.com>

Il 18/04/2013 01:41, Wei Yongjun ha scritto:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  arch/x86/kvm/x86.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index e172132..c45d656 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -6706,8 +6706,10 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
>  	}
>  	vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
>  
> -	if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL))
> +	if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask, GFP_KERNEL)) {
> +		r = -ENOMEM;
>  		goto fail_free_mce_banks;
> +	}
>  
>  	r = fx_init(vcpu);
>  	if (r)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-04-18  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 23:41 [PATCH] KVM: x86: fix error return code in kvm_arch_vcpu_init() Wei Yongjun
2013-04-18  8:23 ` Paolo Bonzini [this message]
2013-04-22  7:57 ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516FAD89.4060005@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=weiyj.lk@gmail.com \
    --cc=x86@kernel.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.