diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-11-19 10:23:32 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-11-19 10:36:19 +0100 |
commit | 38e62918e03f7b26e56c3dbed2d2a71e39b497b8 (patch) | |
tree | 13a66290397f2919bf0c7db522c525fa789e6bd5 | |
parent | 7496032c316b1242710710e4675a936231b3401d (diff) |
usbredirhost: Fix a cancellation corner case
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | usbredirhost/usbredirhost.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c index 86e1a92..47ee5e4 100644 --- a/usbredirhost/usbredirhost.c +++ b/usbredirhost/usbredirhost.c @@ -1912,7 +1912,9 @@ static void usbredirhost_cancel_data_packet(void *priv, uint64_t id) LOCK(host); for (t = host->transfers_head.next; t; t = t->next) { - if (t->id == id) { + /* After cancellation the guest may re-use the id, so skip already + cancelled packets */ + if (!t->cancelled && t->id == id) { break; } } |