qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] irq: fix memory leak
@ 2017-12-25  2:47 linzhecheng
  2017-12-25  5:33 ` Peter Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: linzhecheng @ 2017-12-25  2:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: arei.gonglei, peterx, mst, pbonzini, linzhecheng

entry is moved from list but is not freed.

Signed-off-by: linzhecheng <linzhecheng@huawei.com>

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 351b64f77c..3c920db79a 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(int virq)
         if (entry->virq == virq) {
             trace_kvm_x86_remove_msi_route(virq);
             QLIST_REMOVE(entry, list);
+            g_free(entry);
             break;
         }
     }
-- 
2.12.2.windows.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] irq: fix memory leak
  2017-12-25  2:47 [Qemu-devel] [PATCH] irq: fix memory leak linzhecheng
@ 2017-12-25  5:33 ` Peter Xu
  2017-12-25  6:59 ` Peter Xu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Xu @ 2017-12-25  5:33 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, pbonzini, arei.gonglei, mst

On Mon, Dec 25, 2017 at 10:47:04AM +0800, linzhecheng wrote:
> entry is moved from list but is not freed.
> 
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 351b64f77c..3c920db79a 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(int virq)
>          if (entry->virq == virq) {
>              trace_kvm_x86_remove_msi_route(virq);
>              QLIST_REMOVE(entry, list);
> +            g_free(entry);
>              break;
>          }
>      }
> -- 
> 2.12.2.windows.2
> 
> 
> 

My INBOX didn't really catch this email, don't know why.  Anyway,
thanks for fixing that.

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] irq: fix memory leak
  2017-12-25  2:47 [Qemu-devel] [PATCH] irq: fix memory leak linzhecheng
  2017-12-25  5:33 ` Peter Xu
@ 2017-12-25  6:59 ` Peter Xu
  2018-01-09  4:13 ` Michael S. Tsirkin
  2018-01-09 17:55 ` Paolo Bonzini
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Xu @ 2017-12-25  6:59 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, arei.gonglei, mst, pbonzini

On Mon, Dec 25, 2017 at 10:47:04AM +0800, linzhecheng wrote:
> entry is moved from list but is not freed.
> 
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 351b64f77c..3c920db79a 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(int virq)
>          if (entry->virq == virq) {
>              trace_kvm_x86_remove_msi_route(virq);
>              QLIST_REMOVE(entry, list);
> +            g_free(entry);
>              break;
>          }
>      }
> -- 
> 2.12.2.windows.2
> 
> 

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] irq: fix memory leak
  2017-12-25  2:47 [Qemu-devel] [PATCH] irq: fix memory leak linzhecheng
  2017-12-25  5:33 ` Peter Xu
  2017-12-25  6:59 ` Peter Xu
@ 2018-01-09  4:13 ` Michael S. Tsirkin
  2018-01-09 17:55 ` Paolo Bonzini
  3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2018-01-09  4:13 UTC (permalink / raw)
  To: linzhecheng; +Cc: qemu-devel, arei.gonglei, peterx, pbonzini

On Mon, Dec 25, 2017 at 10:47:04AM +0800, linzhecheng wrote:
> entry is moved from list but is not freed.
> 
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>


Makes sense.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 351b64f77c..3c920db79a 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(int virq)
>          if (entry->virq == virq) {
>              trace_kvm_x86_remove_msi_route(virq);
>              QLIST_REMOVE(entry, list);
> +            g_free(entry);
>              break;
>          }
>      }
> -- 
> 2.12.2.windows.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] irq: fix memory leak
  2017-12-25  2:47 [Qemu-devel] [PATCH] irq: fix memory leak linzhecheng
                   ` (2 preceding siblings ...)
  2018-01-09  4:13 ` Michael S. Tsirkin
@ 2018-01-09 17:55 ` Paolo Bonzini
  3 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2018-01-09 17:55 UTC (permalink / raw)
  To: linzhecheng, qemu-devel; +Cc: arei.gonglei, peterx, mst

On 25/12/2017 03:47, linzhecheng wrote:
> entry is moved from list but is not freed.
> 
> Signed-off-by: linzhecheng <linzhecheng@huawei.com>
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 351b64f77c..3c920db79a 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -3494,6 +3494,7 @@ int kvm_arch_release_virq_post(int virq)
>          if (entry->virq == virq) {
>              trace_kvm_x86_remove_msi_route(virq);
>              QLIST_REMOVE(entry, list);
> +            g_free(entry);
>              break;
>          }
>      }
> 

Queued, thanks.

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-09 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25  2:47 [Qemu-devel] [PATCH] irq: fix memory leak linzhecheng
2017-12-25  5:33 ` Peter Xu
2017-12-25  6:59 ` Peter Xu
2018-01-09  4:13 ` Michael S. Tsirkin
2018-01-09 17:55 ` Paolo Bonzini

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).