[glib/glib-2-38] kqueue: fix a potential deadlock
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-38] kqueue: fix a potential deadlock
- Date: Thu, 26 Dec 2013 21:05:01 +0000 (UTC)
commit ee5a9fa24619e3c1fe63be75bc7578a12bfe7b76
Author: Antoine Jacoutot <ajacoutot gnome org>
Date: Thu Dec 26 11:03:45 2013 +0100
kqueue: fix a potential deadlock
In case an object is already monitored, we lock then return without
unlocking it which can then result in a self deadlock. So properly
unlock before returning.
https://bugzilla.gnome.org/show_bug.cgi?id=721074
gio/kqueue/kqueue-missing.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/kqueue/kqueue-missing.c b/gio/kqueue/kqueue-missing.c
index 9ea3c3e..9decdc9 100644
--- a/gio/kqueue/kqueue-missing.c
+++ b/gio/kqueue/kqueue-missing.c
@@ -68,6 +68,7 @@ _km_add_missing (kqueue_sub *sub)
if (g_slist_find (missing_subs_list, sub))
{
KM_W ("asked to add %s to missing list but it's already on the list!\n", sub->filename);
+ G_UNLOCK (missing_lock);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]