From b9ef520f9caf20aba8ac7cb2bbba45b52ff19d53 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 19 Aug 2005 13:46:34 -0700 Subject: [PATCH] IB: fix userspace CM deadlock Fix deadlock condition resulting from trying to destroy a cm_id from the context of a CM thread. The synchronization around the ucm context structure is simplified as a result, and some simple code cleanup is included. Signed-off-by: Sean Hefty Signed-off-by: Roland Dreier --- drivers/infiniband/core/ucm.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/infiniband/core/ucm.h') diff --git a/drivers/infiniband/core/ucm.h b/drivers/infiniband/core/ucm.h index 6d36606151b2..039e8a3783c0 100644 --- a/drivers/infiniband/core/ucm.h +++ b/drivers/infiniband/core/ucm.h @@ -48,9 +48,7 @@ struct ib_ucm_file { struct semaphore mutex; struct file *filp; - /* - * list of pending events - */ + struct list_head ctxs; /* list of active connections */ struct list_head events; /* list of pending events */ wait_queue_head_t poll_wait; @@ -58,12 +56,11 @@ struct ib_ucm_file { struct ib_ucm_context { int id; - int ref; - int error; + wait_queue_head_t wait; + atomic_t ref; struct ib_ucm_file *file; struct ib_cm_id *cm_id; - struct semaphore mutex; struct list_head events; /* list of pending events. */ struct list_head file_list; /* member in file ctx list */ -- cgit v1.2.3 From a4d61e84804f3b14cc35c5e2af768a07c0f64ef6 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Thu, 25 Aug 2005 13:40:04 -0700 Subject: [PATCH] IB: move include files to include/rdma Move the InfiniBand headers from drivers/infiniband/include to include/rdma. This allows InfiniBand-using code to live elsewhere, and lets us remove the ugly EXTRA_CFLAGS include path from the InfiniBand Makefiles. Signed-off-by: Roland Dreier --- drivers/infiniband/core/ucm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/infiniband/core/ucm.h') diff --git a/drivers/infiniband/core/ucm.h b/drivers/infiniband/core/ucm.h index 039e8a3783c0..c8819b928a1b 100644 --- a/drivers/infiniband/core/ucm.h +++ b/drivers/infiniband/core/ucm.h @@ -40,8 +40,8 @@ #include #include -#include -#include +#include +#include #define IB_UCM_CM_ID_INVALID 0xffffffff -- cgit v1.2.3