[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B465C2D.8030303@gmail.com>
Date: Thu, 07 Jan 2010 23:11:57 +0100
From: Roel Kluin <roel.kluin@...il.com>
To: Xiantao Zhang <xiantao.zhang@...el.com>, kvm-ia64@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] KVM: dereference of NULL pointer in set_pal_result()
Do not dereference a NULL pointer
Signed-off-by: Roel Kluin <roel.kluin@...il.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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists