diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-07-19 15:25:46 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-07-19 15:44:49 +0900 |
commit | 7231a3295bc2d6238d2e95999be7f642d4b6730a (patch) | |
tree | 4c1a6fb043fdf668daf913113c26c6bc113729f5 /src/lib | |
parent | b98bc51968a8a0f8cdfb7d29cf93e207ba47c253 (diff) |
eo: Fix deadlock due to the shared mutex
Explicit lock / unlock of the shared mutex mixed with implicit
lock / unlock when accessing the internal Eo_Object data lead
to uncaught issues such as these.
This was found by trying to run E with gfx filters under eo_debug.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/eo/eo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 2345fd3196..5af21f5f74 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c | |||
@@ -1695,12 +1695,14 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id) | |||
1695 | // Currently implemented by reusing the LAST op id. Just marking it with | 1695 | // Currently implemented by reusing the LAST op id. Just marking it with |
1696 | // _eo_class_isa_func. | 1696 | // _eo_class_isa_func. |
1697 | isa = tdata->cache.isa = (func && (func->func == _eo_class_isa_func)); | 1697 | isa = tdata->cache.isa = (func && (func->func == _eo_class_isa_func)); |
1698 | EO_OBJ_DONE(eo_id); | ||
1698 | eina_lock_release(&(_eo_table_data_shared_data->obj_lock)); | 1699 | eina_lock_release(&(_eo_table_data_shared_data->obj_lock)); |
1699 | } | 1700 | } |
1700 | return isa; | 1701 | return isa; |
1701 | 1702 | ||
1702 | err_shared_class: | 1703 | err_shared_class: |
1703 | _EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id); | 1704 | _EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id); |
1705 | EO_OBJ_DONE(eo_id); | ||
1704 | err_shared_obj: | 1706 | err_shared_obj: |
1705 | eina_lock_release(&(_eo_table_data_shared_data->obj_lock)); | 1707 | eina_lock_release(&(_eo_table_data_shared_data->obj_lock)); |
1706 | return EINA_FALSE; | 1708 | return EINA_FALSE; |