* [PATCH] intel: update global_name before HASH_ADD
@ 2017-01-14 0:07 Dongwon Kim
2017-01-15 20:16 ` Chris Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Dongwon Kim @ 2017-01-14 0:07 UTC (permalink / raw)
To: dri-devel; +Cc: Dongwon Kim
bo->global_name should be updated first before a hash value
for the entry is calculated with it by HASH_ADD macro.
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
intel/intel_bufmgr_gem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 75949b9..c47cb9b 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2736,11 +2736,12 @@ drm_intel_gem_bo_flink(drm_intel_bo *bo, uint32_t * name)
pthread_mutex_lock(&bufmgr_gem->lock);
if (!bo_gem->global_name) {
+ bo_gem->global_name = flink.name;
+ bo_gem->reusable = false;
+
HASH_ADD(name_hh, bufmgr_gem->name_table,
global_name, sizeof(bo_gem->global_name),
bo_gem);
- bo_gem->global_name = flink.name;
- bo_gem->reusable = false;
}
pthread_mutex_unlock(&bufmgr_gem->lock);
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] intel: update global_name before HASH_ADD
2017-01-14 0:07 [PATCH] intel: update global_name before HASH_ADD Dongwon Kim
@ 2017-01-15 20:16 ` Chris Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2017-01-15 20:16 UTC (permalink / raw)
To: Dongwon Kim; +Cc: dri-devel
On Fri, Jan 13, 2017 at 04:07:00PM -0800, Dongwon Kim wrote:
> bo->global_name should be updated first before a hash value
> for the entry is calculated with it by HASH_ADD macro.
>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Thanks for the fix! Pushed,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-15 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-14 0:07 [PATCH] intel: update global_name before HASH_ADD Dongwon Kim
2017-01-15 20:16 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.