infiniband:core:Fix mutex locking to lock before unlocking in the function cma_ib_mc_handler
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines
This fixes mutex locking to lock before unlocking in the function
cma_ib_mc_handlerfor the mutexhandler_mutexas part of the pointerid_privbefore unlocking it after the critical region for event handler work and execution in order to have actual proper concurrent execution protection around this critical region in the functioncma_ib_mc_handler.
The call cma_disable_callback() acquires the mutex.
Quoted 9 lines
--- drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+)drivers/infiniband/core/cma.c +0
-0
drivers/infiniband/core/cma.c static int cma_ib_mc_handler(int status, struct · line 3162
Quoted 5 lines
drivers/infiniband/core/cma.c +1
-0@@ -3158,6 +3158,7 @@ static int cma_ib_mc_handler(int status, struct ib_sa_multicast *multicast) }else event.event =RDMA_CM_EVENT_MULTICAST_ERROR ; +mutex_lock (&id_priv->handler_mutex);
This mutex is already held at this point.
Quoted 5 lines
drivers/infiniband/core/cma.c +0
-0ret = id_priv->id.event_handler (&id_priv->id, &event);if (ret) {
cma_exch(id_priv, RDMA_CM_DESTROYING);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html