Fwd: where do usbredir patches go nowadays?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






-------- Forwarded Message --------
Subject: where do usbredir patches go nowadays?
Date: Mon, 18 Jul 2016 17:23:44 +0300
From: Alon Levy <alon@xxxxxxxxx>
To: Hans de Goede <hdegoede@xxxxxxxxxx>

Well, ok, so I'm taking this time to say hi - you seem to be having good
GPU fun these days.

>From 132286d0972914cd36c586be6b9b6fa3d0ee982c Mon Sep 17 00:00:00 2001
From: Alon Levy <alon@xxxxxxxxx>
Date: Mon, 18 Jul 2016 17:13:27 +0300
Subject: [PATCH] usbredirparser: prevent endless recursion if interface_count
 == 0

On fedora 24 this function is tail optimized, resulting in a busy wait.

usbredir-0.7.1-2.fc24.x86_64
---
 usbredirparser/usbredirfilter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usbredirparser/usbredirfilter.c b/usbredirparser/usbredirfilter.c
index 02184ef..bdfbfc2 100644
--- a/usbredirparser/usbredirfilter.c
+++ b/usbredirparser/usbredirfilter.c
@@ -205,7 +205,7 @@ int usbredirfilter_check(
      * by recursively calling this function with a flag that forbids
      * skipping (usbredirfilter_fl_dont_skip_non_boot_hid)
      */
-    if (num_skipped == interface_count) {
+    if (interface_count > 0 && num_skipped == interface_count) {
         rc = usbredirfilter_check(rules, rules_count,
                                   device_class, device_subclass, device_protocol,
                                   interface_class, interface_subclass,
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]