From b1d4def05992bf061d6e0cc901ca00b7995e8d75 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 12 Mar 2014 22:05:15 -0400 Subject: nouveau: safen up nouveau_device list usage against concurrent access I cannot make nouveau_bo_wrap thread-safe (by design), but it seems to be used to convert drm fb's to nouveau_bo's and to get a notify handle from fifo->notify in nv30_screen.c Signed-off-by: Ilia Mirkin Signed-off-by: Maarten Lankhorst --- nouveau/private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nouveau/private.h') diff --git a/nouveau/private.h b/nouveau/private.h index 60714b8e..4f337ad1 100644 --- a/nouveau/private.h +++ b/nouveau/private.h @@ -3,6 +3,7 @@ #include #include +#include #include "nouveau_drm.h" #include "nouveau.h" @@ -94,7 +95,7 @@ nouveau_bo(struct nouveau_bo *bo) struct nouveau_device_priv { struct nouveau_device base; int close; - atomic_t lock; + pthread_mutex_t lock; struct nouveau_list bo_list; uint32_t *client; int nr_client; -- cgit v1.2.3