qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: 李强 <liq3ea@163.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: ehabkost@redhat.com, richard.henderson@linaro.org,
	imammedo@redhat.com, cota@braap.org, philmd@redhat.com,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qom: cpu: destroy work_mutex in cpu_common_finalize
Date: Sun, 10 Mar 2019 19:27:14 +0800 (CST)	[thread overview]
Message-ID: <59a23906.6c71.169675b5d10.Coremail.liq3ea@163.com> (raw)
In-Reply-To: <a697a5a0-54e5-0a2f-8d6c-e204a095ff6c@redhat.com>

Hi Paolo,

What's the status of this patch? I don't see it in upstream.


Thanks,
Li Qiang


At 2019-01-08 07:41:09, "Paolo Bonzini" <pbonzini@redhat.com> wrote:
>On 02/01/19 08:41, Li Qiang wrote:
>> Commit 376692b9dc6(cpus: protect work list with work_mutex)
>> initialize a work_mutex in cpu_common_initfn, however forget
>> to destroy it. This will cause resource leak when hotunplug cpu
>> or hotplug cpu fails.
>> 
>> Signed-off-by: Li Qiang <liq3ea@163.com>
>> ---
>>  qom/cpu.c | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/qom/cpu.c b/qom/cpu.c
>> index 9ad1372d57..367ebf9d61 100644
>> --- a/qom/cpu.c
>> +++ b/qom/cpu.c
>> @@ -380,6 +380,9 @@ static void cpu_common_initfn(Object *obj)
>>  
>>  static void cpu_common_finalize(Object *obj)
>>  {
>> +    CPUState *cpu = CPU(obj);
>> +
>> +    qemu_mutex_destroy(&cpu->work_mutex);
>>  }
>>  
>>  static int64_t cpu_common_get_arch_id(CPUState *cpu)
>> 
>
>Queued, thanks.
>
>Paolo

      reply	other threads:[~2019-03-10 11:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02  7:41 [Qemu-devel] [PATCH] qom: cpu: destroy work_mutex in cpu_common_finalize Li Qiang
2019-01-02 10:55 ` Philippe Mathieu-Daudé
2019-01-07 23:41 ` Paolo Bonzini
2019-03-10 11:27   ` 李强 [this message]

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=59a23906.6c71.169675b5d10.Coremail.liq3ea@163.com \
    --to=liq3ea@163.com \
    --cc=cota@braap.org \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).