qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents
@ 2014-09-12 10:08 Paolo Bonzini
  2014-09-12 14:20 ` Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2014-09-12 10:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, geleman, famz, stefanha

Always initialize it with the return value of aio_prepare.

Reported-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 aio-win32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/aio-win32.c b/aio-win32.c
index 61e3d2d..7daeae1 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -283,9 +283,9 @@ bool aio_poll(AioContext *ctx, bool blocking)
     int count;
     int timeout;
 
-    if (aio_prepare(ctx)) {
+    have_select_revents = aio_prepare(ctx);
+    if (have_select_revents) {
         blocking = false;
-        have_select_revents = true;
     }
 
     was_dispatching = ctx->dispatching;
-- 
2.1.0

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

* Re: [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents
  2014-09-12 10:08 [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents Paolo Bonzini
@ 2014-09-12 14:20 ` Stefan Hajnoczi
  2014-09-15  2:36 ` Fam Zheng
  2014-09-15 15:51 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-09-12 14:20 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, geleman, famz, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

On Fri, Sep 12, 2014 at 12:08:49PM +0200, Paolo Bonzini wrote:
> Always initialize it with the return value of aio_prepare.
> 
> Reported-by: TeLeMan <geleman@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  aio-win32.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents
  2014-09-12 10:08 [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents Paolo Bonzini
  2014-09-12 14:20 ` Stefan Hajnoczi
@ 2014-09-15  2:36 ` Fam Zheng
  2014-09-15 15:51 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Fam Zheng @ 2014-09-15  2:36 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, geleman, qemu-devel, stefanha

On Fri, 09/12 12:08, Paolo Bonzini wrote:
> Always initialize it with the return value of aio_prepare.
> 
> Reported-by: TeLeMan <geleman@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  aio-win32.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/aio-win32.c b/aio-win32.c
> index 61e3d2d..7daeae1 100644
> --- a/aio-win32.c
> +++ b/aio-win32.c
> @@ -283,9 +283,9 @@ bool aio_poll(AioContext *ctx, bool blocking)
>      int count;
>      int timeout;
>  
> -    if (aio_prepare(ctx)) {
> +    have_select_revents = aio_prepare(ctx);
> +    if (have_select_revents) {
>          blocking = false;
> -        have_select_revents = true;
>      }
>  
>      was_dispatching = ctx->dispatching;
> -- 
> 2.1.0
> 

Reviewed-by: Fam Zheng <famz@redhat.com>

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

* Re: [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents
  2014-09-12 10:08 [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents Paolo Bonzini
  2014-09-12 14:20 ` Stefan Hajnoczi
  2014-09-15  2:36 ` Fam Zheng
@ 2014-09-15 15:51 ` Stefan Hajnoczi
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-09-15 15:51 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kwolf, geleman, famz, qemu-devel, stefanha

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Fri, Sep 12, 2014 at 12:08:49PM +0200, Paolo Bonzini wrote:
> Always initialize it with the return value of aio_prepare.
> 
> Reported-by: TeLeMan <geleman@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  aio-win32.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-09-15 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 10:08 [Qemu-devel] [PATCH] aio-win32: fix uninitialized use of have_select_revents Paolo Bonzini
2014-09-12 14:20 ` Stefan Hajnoczi
2014-09-15  2:36 ` Fam Zheng
2014-09-15 15:51 ` Stefan Hajnoczi

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