raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=98a02fc17c8d630068684385f74787bfc26183cf

commit 98a02fc17c8d630068684385f74787bfc26183cf
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Jul 11 21:45:39 2016 +0900

    evas scale cache - address possible coverity deadlock
    
    this should fix CID 1106338  where we don't lock and unlock caches in
    the same order.
---
 src/lib/evas/common/evas_image_scalecache.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/common/evas_image_scalecache.c 
b/src/lib/evas/common/evas_image_scalecache.c
index 16c4451..978a4cb 100644
--- a/src/lib/evas/common/evas_image_scalecache.c
+++ b/src/lib/evas/common/evas_image_scalecache.c
@@ -802,7 +802,10 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, 
RGBA_Image *dst,
                   ct = evas_common_draw_context_new();
                   evas_common_draw_context_set_render_op(ct, 
_EVAS_RENDER_COPY);
                }
+             SLKU(cache_lock);
              SLKU(im->cache.lock);
+
+             SLKL(cache_lock);
              if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
                {
 #ifdef EVAS_CSERVE2
@@ -812,7 +815,10 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, 
RGBA_Image *dst,
 #endif
                     evas_cache_image_load_data(&im->cache_entry);
                }
+             SLKU(cache_lock);
+
              SLKL(im->cache.lock);
+             SLKL(cache_lock);
              evas_common_image_colorspace_normalize(im);
              if (im->image.data)
                {

-- 


Reply via email to