public inbox for kvm-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: dereference of NULL pointer in set_pal_result()
@ 2010-01-07 22:11 Roel Kluin
  2010-01-07 23:28 ` Zhang, Xiantao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ 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] 5+ messages in thread

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

Thread overview: 5+ 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 23:28 ` Zhang, Xiantao
2010-01-08  7:12 ` Gabor Gombas
2010-01-08  9:14 ` Zhang, Xiantao
2010-01-08 12:25 ` roel kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox