From patchwork Fri Mar 12 03:05:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 85186 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2C32Frd001109 for ; Fri, 12 Mar 2010 03:02:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753925Ab0CLDCN (ORCPT ); Thu, 11 Mar 2010 22:02:13 -0500 Received: from serv2.oss.ntt.co.jp ([222.151.198.100]:52437 "EHLO serv2.oss.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413Ab0CLDCM (ORCPT ); Thu, 11 Mar 2010 22:02:12 -0500 Received: from serv2.oss.ntt.co.jp (localhost [127.0.0.1]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id E059624834A; Fri, 12 Mar 2010 12:02:11 +0900 (JST) Received: from serv1.oss.ntt.co.jp (serv1.oss.ntt.co.jp [172.19.0.2]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id CB7E424832F; Fri, 12 Mar 2010 12:02:11 +0900 (JST) Received: from yshtky3.kern.oss.ntt.co.jp (unknown [172.17.1.146]) by serv1.oss.ntt.co.jp (Postfix) with SMTP id 8D7BB11C0B2; Fri, 12 Mar 2010 12:02:11 +0900 (JST) Date: Fri, 12 Mar 2010 12:05:23 +0900 From: Takuya Yoshikawa To: avi@redhat.com, mtosatti@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] KVM: coalesced_mmio: NULLify the pointers before freeing ring page and dev Message-Id: <20100312120523.1b147c58.yoshikawa.takuya@oss.ntt.co.jp> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.16.1; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 12 Mar 2010 03:02:17 +0000 (UTC) diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c index 5169736..11776b7 100644 --- a/virt/kvm/coalesced_mmio.c +++ b/virt/kvm/coalesced_mmio.c @@ -119,8 +119,10 @@ int kvm_coalesced_mmio_init(struct kvm *kvm) return ret; out_free_dev: + kvm->coalesced_mmio_dev = NULL; kfree(dev); out_free_page: + kvm->coalesced_mmio_ring = NULL; __free_page(page); out_err: return ret;