raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=eec2daf31b84d17a9ab9490fb80188f94c0a3bbc
commit eec2daf31b84d17a9ab9490fb80188f94c0a3bbc Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Thu Aug 14 18:03:07 2014 +0900 evas preload + locking - fix deadlock there is a possible deadlock condition where locks are not taken in the same order (img lock then cancel lock). re-order so this doesn't happen. this fixes CID 1106339 --- src/lib/evas/cache/evas_cache_image.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index dc1d0d8..a3c472d 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -1193,21 +1193,23 @@ evas_cache_image_unload_data(Image_Entry *im) if (im->flags.in_progress) return; evas_cache_image_preload_cancel(im, NULL); - SLKL(im->lock_cancel); if (SLKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */ { + SLKL(im->lock_cancel); im->flags.unload_cancel = EINA_TRUE; SLKU(im->lock_cancel); return; } - SLKU(im->lock_cancel); + SLKL(im->lock_cancel); if ((!im->flags.loaded) || (!im->file && !im->f) || (!im->info.module) || (im->flags.dirty)) { + SLKU(im->lock_cancel); SLKU(im->lock); return; } + SLKU(im->lock_cancel); im->cache->func.destructor(im); SLKU(im->lock); //FIXME: imagedataunload - inform owners --
