All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] net/colo-compare.c: Fix a crash in COLO Primary.
@ 2019-04-19 13:56 Lukas Straub
  2019-04-19 17:38 ` Zhang, Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Straub @ 2019-04-19 13:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Zhang, Chen

From: Lukas Straub <lukasstraub2@web.de>
Fixes the following bug: https://bugs.launchpad.net/qemu/+bug/1824622

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
 net/colo-compare.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/colo-compare.c b/net/colo-compare.c
index bf10526f05..fcb491121b 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -813,9 +813,8 @@ static void colo_compare_handle_event(void *opaque)
         break;
     }

-    assert(event_unhandled_count > 0);
-
     qemu_mutex_lock(&event_mtx);
+    assert(event_unhandled_count > 0);
     event_unhandled_count--;
     qemu_cond_broadcast(&event_complete_cond);
     qemu_mutex_unlock(&event_mtx);
--
2.20.1

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

* Re: [Qemu-devel] [PATCH] net/colo-compare.c: Fix a crash in COLO Primary.
  2019-04-19 13:56 [Qemu-devel] [PATCH] net/colo-compare.c: Fix a crash in COLO Primary Lukas Straub
@ 2019-04-19 17:38 ` Zhang, Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Chen @ 2019-04-19 17:38 UTC (permalink / raw)
  To: Lukas Straub, qemu-devel




> -----Original Message-----
> From: Lukas Straub [mailto:lukasstraub2@web.de]
> Sent: Friday, April 19, 2019 9:56 PM
> To: qemu-devel@nongnu.org
> Cc: Zhang, Chen <chen.zhang@intel.com>
> Subject: [PATCH] net/colo-compare.c: Fix a crash in COLO Primary.
> 
> From: Lukas Straub <lukasstraub2@web.de> Fixes the following bug:
> https://bugs.launchpad.net/qemu/+bug/1824622

It looks good for me, but I think you need add more comments in commit message,
For example what situation will trigger this bug and why it will occur.
After that, I think you can close the bug in Launchpad.

Thanks
Zhang Chen

> 
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
> ---
>  net/colo-compare.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/colo-compare.c b/net/colo-compare.c index
> bf10526f05..fcb491121b 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -813,9 +813,8 @@ static void colo_compare_handle_event(void *opaque)
>          break;
>      }
> 
> -    assert(event_unhandled_count > 0);
> -
>      qemu_mutex_lock(&event_mtx);
> +    assert(event_unhandled_count > 0);
>      event_unhandled_count--;
>      qemu_cond_broadcast(&event_complete_cond);
>      qemu_mutex_unlock(&event_mtx);
> --
> 2.20.1

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

end of thread, other threads:[~2019-04-19 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 13:56 [Qemu-devel] [PATCH] net/colo-compare.c: Fix a crash in COLO Primary Lukas Straub
2019-04-19 17:38 ` Zhang, Chen

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.