From 776918063d830dc8f843cafd88f3cb9760f00c7a Mon Sep 17 00:00:00 2001 From: Zhai Edwin Date: Fri, 16 Dec 2011 15:53:23 +0800 Subject: libical: Fix deadlock in pthread libical introduce pthread support after 0.47, but lead deadlock with missing some unlock code. This makes dates start hang. Add new patch to properly release mutex. [YOCTO #1825] got fixed. (From OE-Core rev: 584abc5f3d6cbaf8f8bf09123e8abc421f0699a8) Signed-off-by: Zhai Edwin Signed-off-by: Richard Purdie --- meta/recipes-sato/libical/files/pthread-fix.patch | 52 +++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meta/recipes-sato/libical/files/pthread-fix.patch (limited to 'meta/recipes-sato/libical/files') diff --git a/meta/recipes-sato/libical/files/pthread-fix.patch b/meta/recipes-sato/libical/files/pthread-fix.patch new file mode 100644 index 0000000000..aa7767f22d --- /dev/null +++ b/meta/recipes-sato/libical/files/pthread-fix.patch @@ -0,0 +1,52 @@ +New added pthread feathre leads some deadlock with some unlock code missing. +This patch fix it. + +Signed-off-by: Zhai Edwin + +Upstream-Status: Pending + +Index: libical-0.47/src/libical/icaltimezone.c +=================================================================== +--- libical-0.47.orig/src/libical/icaltimezone.c 2011-12-16 13:42:25.000000000 +0800 ++++ libical-0.47/src/libical/icaltimezone.c 2011-12-16 14:16:25.000000000 +0800 +@@ -1773,7 +1773,7 @@ + filename = (char*) malloc (filename_len); + if (!filename) { + icalerror_set_errno(ICAL_NEWFAILED_ERROR); +- return; ++ goto out; + } + + snprintf (filename, filename_len, "%s/%s.ics", get_zone_directory(), +@@ -1783,7 +1783,7 @@ + free (filename); + if (!fp) { + icalerror_set_errno(ICAL_FILE_ERROR); +- return; ++ goto out; + } + + +@@ -1807,7 +1807,7 @@ + + if (!subcomp) { + icalerror_set_errno(ICAL_PARSE_ERROR); +- return; ++ goto out; + } + + icaltimezone_get_vtimezone_properties (zone, subcomp); +@@ -1817,10 +1817,12 @@ + icalcomponent_free(comp); + } + #endif +-#ifdef HAVE_PTHREAD ++ + out: ++#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&builtin_mutex); + #endif ++ return; + } + + -- cgit v1.2.3-54-g00ecf