teuf pushed to spice-gtk (f21). "Add patch fixing USB redirection related race/crash"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 2 14:19:25 UTC 2015
>From dbf53beb39421e53e31209f5740a5f26ea689082 Mon Sep 17 00:00:00 2001
From: Christophe Fergeau <cfergeau at redhat.com>
Date: Thu, 2 Apr 2015 16:15:40 +0200
Subject: Add patch fixing USB redirection related race/crash
diff --git a/0011-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch b/0011-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
new file mode 100644
index 0000000..dfd326e
--- /dev/null
+++ b/0011-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 3e4d65e..4c9ebad 100644
--- a/spice-gtk.spec
+++ b/spice-gtk.spec
@@ -7,7 +7,7 @@
Name: spice-gtk
Version: 0.27
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A GTK+ widget for SPICE clients
Group: System Environment/Libraries
@@ -25,6 +25,7 @@ Patch0007: 0007-usbredir-prevent-crash-when-calling-without-host.patch
Patch0008: 0008-channel-delay-event-report-to-after-coroutine-exit.patch
Patch0009: 0009-channel-reset-tls-state-when-client-calls-connect.patch
Patch0010: 0010-channel-reset-connection-state-on-error.patch
+Patch0011: 0011-channel-usbredir-Do-not-stop-event-listening-if-Spic.patch
BuildRequires: intltool
BuildRequires: gtk2-devel >= 2.14
@@ -165,6 +166,7 @@ find . -name '*.stamp' | xargs touch
%patch0008 -p1
%patch0009 -p1
%patch0010 -p1
+%patch0011 -p1
popd
%if %{with_gtk3}
@@ -286,6 +288,10 @@ rm -rf %{buildroot}%{_datadir}/pkgconfig/spice-protocol.pc
%{_bindir}/spicy-stats
%changelog
+* Thu Apr 02 2015 Christophe Fergeau <cfergeau at redhat.com> 0.27-6
+- Add patch fixing USB redirection related race/crash
+ Resolves: rhbz#1182226
+
* Tue Jan 27 2015 Marc-André Lureau <marcandre.lureau at redhat.com> 0.27-5
- Fix reconnection on same session regressions introduced in 27-2.
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/spice-gtk.git/commit/?h=f21&id=dbf53beb39421e53e31209f5740a5f26ea689082
More information about the scm-commits
mailing list