[openib-general] [PATCH] Synchronize access to event list in uCM

Sean Hefty sean.hefty at intel.com
Fri Mar 3 21:29:21 PST 2006


Fix synchronization around accessing event list.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>

---

 drivers/infiniband/core/ucm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

2b2a9f64d1bdba30894c575641c85ec798adca1c
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index f6a0596..168a7f3 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1243,8 +1243,10 @@ static unsigned int ib_ucm_poll(struct f
 
 	poll_wait(filp, &file->poll_wait, wait);
 
+	down(&file->mutex);
 	if (!list_empty(&file->events))
 		mask = POLLIN | POLLRDNORM;
+	up(&file->mutex);
 
 	return mask;
 }
-- 
1.0.6






More information about the general mailing list