From 038d2607ab759638217ded3bd1b232d389975af5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 27 Mar 2010 08:58:59 -0600 Subject: mesa: fix deadlock in _mesa_HashFindFreeKeyBlock() Fixes fd.o bug 27340. (cherry picked from commit 8fe3b3f66ae57a1a6eca7f6dcb0455e14ad92075) --- src/mesa/main/hash.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index 975775469d..f4af3fdcf7 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -127,8 +127,8 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table) * * \return pointer to user's data or NULL if key not in table */ -void * -_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key) +static INLINE void * +_mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key) { GLuint pos; const struct HashEntry *entry; @@ -137,19 +137,26 @@ _mesa_HashLookup(struct _mesa_HashTable *table, GLuint key) assert(key); pos = HASH_FUNC(key); - _glthread_LOCK_MUTEX(table->Mutex); entry = table->Table[pos]; while (entry) { if (entry->Key == key) { - _glthread_UNLOCK_MUTEX(table->Mutex); return entry->Data; } entry = entry->Next; } - _glthread_UNLOCK_MUTEX(table->Mutex); return NULL; } +void * +_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key) +{ + void *res; + assert(table); + _glthread_LOCK_MUTEX(table->Mutex); + res = _mesa_HashLookup_unlocked(table, key); + _glthread_UNLOCK_MUTEX(table->Mutex); + return res; +} /** @@ -447,7 +454,7 @@ _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys) GLuint freeStart = 1; GLuint key; for (key = 1; key != maxKey; key++) { - if (_mesa_HashLookup(table, key)) { + if (_mesa_HashLookup_unlocked(table, key)) { /* darn, this key is already in use */ freeCount = 0; freeStart = key+1; -- cgit v1.2.3 From 9903d09f82c525690cd016e7747ba2fe96c6468f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 27 Mar 2010 08:59:17 -0600 Subject: mesa: move/update hash function comments (cherry picked from commit 535742d75f0096b22d1b8ff203ae561167af18f7) --- src/mesa/main/hash.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index f4af3fdcf7..b624e6ecac 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -120,12 +120,8 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table) /** - * Lookup an entry in the hash table. - * - * \param table the hash table. - * \param key the key. - * - * \return pointer to user's data or NULL if key not in table + * Lookup an entry in the hash table, without locking. + * \sa _mesa_HashLookup */ static INLINE void * _mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key) @@ -147,6 +143,15 @@ _mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key) return NULL; } + +/** + * Lookup an entry in the hash table. + * + * \param table the hash table. + * \param key the key. + * + * \return pointer to user's data or NULL if key not in table + */ void * _mesa_HashLookup(struct _mesa_HashTable *table, GLuint key) { -- cgit v1.2.3 From a6a4613135dc0b93012d3a2b1abcf69f772e4214 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 28 Mar 2010 16:31:08 -0700 Subject: mesa: set version string to 7.8 Also set the correct release date. --- Makefile | 2 +- docs/relnotes-7.8.html | 2 +- src/mesa/main/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/Makefile b/Makefile index 7c75d7f833..6e64134112 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.8-rc2 +VERSION=7.8 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) diff --git a/docs/relnotes-7.8.html b/docs/relnotes-7.8.html index eaf3a8d54a..9622d16652 100644 --- a/docs/relnotes-7.8.html +++ b/docs/relnotes-7.8.html @@ -8,7 +8,7 @@ -

Mesa 7.8 Release Notes / March 26, 2010

+

Mesa 7.8 Release Notes / March 28, 2010

Mesa 7.8 is a new development release. diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 23d74ee2c9..2e1d70c461 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -35,7 +35,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 8 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.8-rc2" +#define MESA_VERSION_STRING "7.8" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From ef6736e6466947afc3ea3c3113359cdadfd8c9cd Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 28 Mar 2010 16:33:53 -0700 Subject: intel: Bump intel driver date to reflect status as 2010Q1 release --- src/mesa/drivers/dri/intel/intel_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index c86dd1d0d9..0a7dcb80c6 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -63,7 +63,7 @@ int INTEL_DEBUG = (0); #endif -#define DRIVER_DATE "20091221 DEVELOPMENT" +#define DRIVER_DATE "20100328 2010Q1" #define DRIVER_DATE_GEM "GEM " DRIVER_DATE -- cgit v1.2.3