cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From a88811fcdd3dbc600a669eed0b106a5bf8f6b907 Mon Sep 17 00:00:00 2001
9ae3a8
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
9ae3a8
Date: Wed, 31 May 2017 08:09:49 +0200
9ae3a8
Subject: [PATCH] spice: fix spice_chr_add_watch() pre-condition
9ae3a8
MIME-Version: 1.0
9ae3a8
Content-Type: text/plain; charset=UTF-8
9ae3a8
Content-Transfer-Encoding: 8bit
9ae3a8
9ae3a8
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
9ae3a8
Message-id: <20170531080949.17102-1-marcandre.lureau@redhat.com>
9ae3a8
Patchwork-id: 75440
9ae3a8
O-Subject: [RHEL-7.4 qemu-kvm PATCH] spice: fix spice_chr_add_watch() pre-condition
9ae3a8
Bugzilla: 1456983
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
RH-Acked-by: John Snow <jsnow@redhat.com>
9ae3a8
9ae3a8
From: Marc-André Lureau <marcandre.lureau@gmail.com>
9ae3a8
9ae3a8
Since e02bc6de30c44fd668dc0d6e1cd1804f2eed3ed3, add_watch() is called
9ae3a8
with G_IO_HUP. Even if spice-qemu-char ignores this flag, the
9ae3a8
precondition must be changed.
9ae3a8
9ae3a8
https://bugzilla.redhat.com/show_bug.cgi?id=1128992
9ae3a8
9ae3a8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
9ae3a8
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1456983
9ae3a8
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13310981
9ae3a8
9ae3a8
"serial: poll the serial console with G_IO_HUP" was backported without
9ae3a8
the Spice related fix.
9ae3a8
9ae3a8
(cherry picked from commit f7a8beb5e6a13dc924895244777d9ef08b23b367)
9ae3a8
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 spice-qemu-char.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/spice-qemu-char.c b/spice-qemu-char.c
9ae3a8
index cd51f3c..02c568c 100644
9ae3a8
--- a/spice-qemu-char.c
9ae3a8
+++ b/spice-qemu-char.c
9ae3a8
@@ -170,7 +170,7 @@ static GSource *spice_chr_add_watch(CharDriverState *chr, GIOCondition cond)
9ae3a8
     SpiceCharDriver *scd = chr->opaque;
9ae3a8
     SpiceCharSource *src;
9ae3a8
 
9ae3a8
-    assert(cond == G_IO_OUT);
9ae3a8
+    assert(cond & G_IO_OUT);
9ae3a8
 
9ae3a8
     src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs,
9ae3a8
                                           sizeof(SpiceCharSource));
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8