teuf pushed to spice-gtk (master). "Add upstream patch fixing an USB redirection crash (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Mar 31 18:17:00 UTC 2015


>From 949e26e6be644a7c9a79952f1f0a26994e605c59 Mon Sep 17 00:00:00 2001
From: Christophe Fergeau <cfergeau at redhat.com>
Date: Tue, 31 Mar 2015 19:07:33 +0200
Subject: Add upstream patch fixing an USB redirection crash

Resolves: rhbz#1182226

diff --git a/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch b/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
new file mode 100644
index 0000000..dfd326e
--- /dev/null
+++ b/0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
@@ -0,0 +1,31 @@
+From e3932bfebbfec7637f3d03d90e8f9b75e3223236 Mon Sep 17 00:00:00 2001
+From: Pavel Grunt <pgrunt at redhat.com>
+Date: Wed, 11 Mar 2015 16:31:39 +0100
+Subject: [spice-gtk] channel-usbredir: Do not stop event listening if
+ SpiceSession does not exist
+
+Avoids Segfault when closing the connection just after the usb device redirection.
+---
+ gtk/channel-usbredir.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c
+index b1a91fb..d974434 100644
+--- a/gtk/channel-usbredir.c
++++ b/gtk/channel-usbredir.c
+@@ -419,9 +419,12 @@ void spice_usbredir_channel_disconnect_device(SpiceUsbredirChannel *channel)
+          * usbredirhost_set_device NULL will interrupt the
+          * libusb_handle_events call in the thread.
+          */
+-        spice_usb_device_manager_stop_event_listening(
+-            spice_usb_device_manager_get(
+-                spice_channel_get_session(SPICE_CHANNEL(channel)), NULL));
++        {
++            SpiceSession *session = spice_channel_get_session(SPICE_CHANNEL(channel));
++            if (session != NULL)
++                spice_usb_device_manager_stop_event_listening(
++                    spice_usb_device_manager_get(session, NULL));
++        }
+         /* This also closes the libusb handle we passed from open_device */
+         usbredirhost_set_device(priv->host, NULL);
+         libusb_unref_device(priv->device);
diff --git a/spice-gtk.spec b/spice-gtk.spec
index 475fea7..81dcb9d 100644
--- a/spice-gtk.spec
+++ b/spice-gtk.spec
@@ -2,7 +2,7 @@
 
 Name:           spice-gtk
 Version:        0.28
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A GTK+ widget for SPICE clients
 
 Group:          System Environment/Libraries
@@ -10,6 +10,7 @@ License:        LGPLv2+
 URL:            http://spice-space.org/page/Spice-Gtk
 #VCS:           git:git://anongit.freedesktop.org/spice/spice-gtk
 Source0:        http://www.spice-space.org/download/gtk/%{name}-%{version}%{?_version_suffix}.tar.bz2
+Patch0:         0001-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
 
 BuildRequires: intltool
 BuildRequires: gtk2-devel >= 2.14
@@ -134,6 +135,7 @@ if [ -n '%{?_version_suffix}' ]; then
 fi
 
 pushd spice-gtk-%{version}
+%patch0 -p1
 find . -name '*.stamp' | xargs touch
 popd
 
@@ -252,6 +254,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc
 %{_bindir}/spicy-stats
 
 %changelog
+* Tue Mar 31 2015 Christophe Fergeau <cfergeau at redhat.com> 0.28-2
+- Add upstream patch fixing an USB redirection crash
+  Resolves: rhbz#1182226
+
 * Wed Mar 4 2015 Marc-André Lureau <marcandre.lureau at redhat.com> 0.28-1
 - Update to spice-gtk v0.28
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/spice-gtk.git/commit/?h=master&id=949e26e6be644a7c9a79952f1f0a26994e605c59


More information about the scm-commits mailing list