* [PATCH] KVM: Fix NULL pointer reference by update_cr8_intercept()
@ 2009-08-19 2:52 Sheng Yang
2009-08-19 8:07 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2009-08-19 2:52 UTC (permalink / raw)
To: Avi Kivity; +Cc: arcezed, kvm, Sheng Yang
Commit 0d11419a result in NULL pointer reference when using
--no-kvm-irqchip.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
arch/x86/kvm/x86.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 850cf56..9ac2d9e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4453,7 +4453,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
kvm_set_segment(vcpu, &sregs->tr, VCPU_SREG_TR);
kvm_set_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR);
- update_cr8_intercept(vcpu);
+ if (kvm_lapic_enabled(vcpu))
+ update_cr8_intercept(vcpu);
/* Older userspace won't unhalt the vcpu on reset. */
if (kvm_vcpu_is_bsp(vcpu) && kvm_rip_read(vcpu) == 0xfff0 &&
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: Fix NULL pointer reference by update_cr8_intercept()
2009-08-19 2:52 [PATCH] KVM: Fix NULL pointer reference by update_cr8_intercept() Sheng Yang
@ 2009-08-19 8:07 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-08-19 8:07 UTC (permalink / raw)
To: Sheng Yang; +Cc: arcezed, kvm
On 08/19/2009 05:52 AM, Sheng Yang wrote:
> Commit 0d11419a result in NULL pointer reference when using
> --no-kvm-irqchip.
>
> Signed-off-by: Sheng Yang<sheng@linux.intel.com>
> ---
> arch/x86/kvm/x86.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 850cf56..9ac2d9e 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -4453,7 +4453,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
> kvm_set_segment(vcpu,&sregs->tr, VCPU_SREG_TR);
> kvm_set_segment(vcpu,&sregs->ldt, VCPU_SREG_LDTR);
>
> - update_cr8_intercept(vcpu);
> + if (kvm_lapic_enabled(vcpu))
> + update_cr8_intercept(vcpu);
>
>
Thanks, I already have a similar fix in update_cr8_intercept() (since it
can be called from another callsite as well). Please check kvm-next.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-19 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 2:52 [PATCH] KVM: Fix NULL pointer reference by update_cr8_intercept() Sheng Yang
2009-08-19 8:07 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).