All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	James Hogan <james.hogan@imgtec.com>
Cc: <gleb@kernel.org>, <kvm@vger.kernel.org>, <sanjayl@kymasys.com>,
	<ralf@linux-mips.org>, <linux-mips@linux-mips.org>
Subject: Re: [PATCH v3 7/9] MIPS: KVM: Fix memory leak on VCPU
Date: Fri, 27 Jun 2014 16:47:20 -0700	[thread overview]
Message-ID: <53AE0288.6000905@imgtec.com> (raw)
In-Reply-To: <53AABDE9.3050907@redhat.com>

Hi Paolo,


On 06/25/2014 05:17 AM, Paolo Bonzini wrote:
> Il 25/06/2014 11:28, James Hogan ha scritto:
>> On 24/06/14 18:31, Deng-Cheng Zhu wrote:
>>> From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
>>>
>>> kvm_arch_vcpu_free() is called in 2 code paths:
>>>
>>> 1) kvm_vm_ioctl()
>>>        kvm_vm_ioctl_create_vcpu()
>>>            kvm_arch_vcpu_destroy()
>>>                kvm_arch_vcpu_free()
>>> 2) kvm_put_kvm()
>>>        kvm_destroy_vm()
>>>            kvm_arch_destroy_vm()
>>>                kvm_mips_free_vcpus()
>>>                    kvm_arch_vcpu_free()
>>>
>>> Neither of the paths handles VCPU free. We need to do it in
>>> kvm_arch_vcpu_free() corresponding to the memory allocation in
>>> kvm_arch_vcpu_create().
>>>
>>> Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
>>
>> Reviewed-by: James Hogan <james.hogan@imgtec.com>
>>
>> Maybe worth adding "Cc: stable@vger.kernel.org" and moving this to the
>> beginning of the patchset to avoid conflicts.
>>
>> Cheers
>> James
>>
>
> I've queued this for 3.16.  It applies cleanly apart for the filename change.

Maybe you forgot to put this on the branch "queue"? I don't see it. Thanks.


Deng-Cheng

WARNING: multiple messages have this Message-ID (diff)
From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	James Hogan <james.hogan@imgtec.com>
Cc: gleb@kernel.org, kvm@vger.kernel.org, sanjayl@kymasys.com,
	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH v3 7/9] MIPS: KVM: Fix memory leak on VCPU
Date: Fri, 27 Jun 2014 16:47:20 -0700	[thread overview]
Message-ID: <53AE0288.6000905@imgtec.com> (raw)
Message-ID: <20140627234720.Zqb7c0O821JsIrxDkjRQDkwmL05L_lLMlnU4kajg4ys@z> (raw)
In-Reply-To: <53AABDE9.3050907@redhat.com>

Hi Paolo,


On 06/25/2014 05:17 AM, Paolo Bonzini wrote:
> Il 25/06/2014 11:28, James Hogan ha scritto:
>> On 24/06/14 18:31, Deng-Cheng Zhu wrote:
>>> From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
>>>
>>> kvm_arch_vcpu_free() is called in 2 code paths:
>>>
>>> 1) kvm_vm_ioctl()
>>>        kvm_vm_ioctl_create_vcpu()
>>>            kvm_arch_vcpu_destroy()
>>>                kvm_arch_vcpu_free()
>>> 2) kvm_put_kvm()
>>>        kvm_destroy_vm()
>>>            kvm_arch_destroy_vm()
>>>                kvm_mips_free_vcpus()
>>>                    kvm_arch_vcpu_free()
>>>
>>> Neither of the paths handles VCPU free. We need to do it in
>>> kvm_arch_vcpu_free() corresponding to the memory allocation in
>>> kvm_arch_vcpu_create().
>>>
>>> Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
>>
>> Reviewed-by: James Hogan <james.hogan@imgtec.com>
>>
>> Maybe worth adding "Cc: stable@vger.kernel.org" and moving this to the
>> beginning of the patchset to avoid conflicts.
>>
>> Cheers
>> James
>>
>
> I've queued this for 3.16.  It applies cleanly apart for the filename change.

Maybe you forgot to put this on the branch "queue"? I don't see it. Thanks.


Deng-Cheng

  reply	other threads:[~2014-06-27 23:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 17:31 [PATCH v3 0/9] MIPS: KVM: Bugfixes and cleanups Deng-Cheng Zhu
2014-06-24 17:31 ` Deng-Cheng Zhu
2014-06-24 17:31 ` [PATCH v3 1/9] MIPS: KVM: Reformat code and comments Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-24 23:13   ` James Hogan
2014-06-24 17:31 ` [PATCH v3 2/9] MIPS: KVM: Use KVM internal logger Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  8:59   ` James Hogan
2014-06-25  8:59     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 3/9] MIPS: KVM: Simplify functions by removing redundancy Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:09   ` James Hogan
2014-06-25  9:09     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 4/9] MIPS: KVM: Remove unneeded volatile Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:09   ` James Hogan
2014-06-25  9:09     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 5/9] MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_" Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:11   ` James Hogan
2014-06-25  9:11     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 6/9] MIPS: KVM: Restore correct value for WIRED at TLB uninit Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:24   ` James Hogan
2014-06-25  9:24     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 7/9] MIPS: KVM: Fix memory leak on VCPU Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:28   ` James Hogan
2014-06-25  9:28     ` James Hogan
2014-06-25 12:17     ` Paolo Bonzini
2014-06-27 23:47       ` Deng-Cheng Zhu [this message]
2014-06-27 23:47         ` Deng-Cheng Zhu
2014-06-24 17:31 ` [PATCH v3 8/9] MIPS: KVM: Skip memory cleaning in kvm_mips_commpage_init() Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25  9:31   ` James Hogan
2014-06-25  9:31     ` James Hogan
2014-06-24 17:31 ` [PATCH v3 9/9] MIPS: KVM: Remove dead code of TLB index error in kvm_mips_emul_tlbwr() Deng-Cheng Zhu
2014-06-24 17:31   ` Deng-Cheng Zhu
2014-06-25 12:18 ` [PATCH v3 0/9] MIPS: KVM: Bugfixes and cleanups Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AE0288.6000905@imgtec.com \
    --to=dengcheng.zhu@imgtec.com \
    --cc=gleb@kernel.org \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=pbonzini@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=sanjayl@kymasys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.