[PATCH libdrm 3/3] freedreno: prevent deadlock in error path

Eric Engestrom eric at engestrom.ch
Sun Jul 30 20:27:40 UTC 2017


Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
 freedreno/freedreno_bo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 10949ebf..7f8ea59c 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -138,6 +138,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd)
 	pthread_mutex_lock(&table_lock);
 	ret = drmPrimeFDToHandle(dev->fd, fd, &handle);
 	if (ret) {
+		pthread_mutex_unlock(&table_lock);
 		return NULL;
 	}
 
-- 
Cheers,
  Eric



More information about the dri-devel mailing list