All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: dereference of NULL pointer in set_pal_result()
@ 2010-01-07 22:11 ` Roel Kluin
  0 siblings, 0 replies; 10+ messages in thread
From: Roel Kluin @ 2010-01-07 22:11 UTC (permalink / raw)
  To: kvm-ia64

Do not dereference a NULL pointer

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 arch/ia64/kvm/kvm_fw.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kvm/kvm_fw.c b/arch/ia64/kvm/kvm_fw.c
index e4b8231..d28494f 100644
--- a/arch/ia64/kvm/kvm_fw.c
+++ b/arch/ia64/kvm/kvm_fw.c
@@ -75,9 +75,11 @@ static void set_pal_result(struct kvm_vcpu *vcpu,
 	struct exit_ctl_data *p;
 
 	p = kvm_get_exit_data(vcpu);
-	if (p && p->exit_reason = EXIT_REASON_PAL_CALL) {
+	if (!p)
+		return;
+	if (p->exit_reason = EXIT_REASON_PAL_CALL) {
 		p->u.pal_data.ret = result;
-		return ;
+		return;
 	}
 	INIT_PAL_STATUS_UNIMPLEMENTED(p->u.pal_data.ret);
 }

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-01-08 12:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 22:11 [PATCH] KVM: dereference of NULL pointer in set_pal_result() Roel Kluin
2010-01-07 22:11 ` Roel Kluin
2010-01-07 23:28 ` Zhang, Xiantao
2010-01-07 23:28   ` Zhang, Xiantao
2010-01-08  7:12 ` Gabor Gombas
2010-01-08  7:12   ` Gabor Gombas
2010-01-08  9:14 ` Zhang, Xiantao
2010-01-08  9:14   ` Zhang, Xiantao
2010-01-08 12:25 ` roel kluin
2010-01-08 12:25   ` roel kluin

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.