[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1828884A29C6694DAF28B7E6B8A82373A90394FC@ORSMSX109.amr.corp.intel.com>
Date: Tue, 8 Sep 2015 16:34:26 +0000
From: "Hefty, Sean" <sean.hefty@...el.com>
To: Nicholas Krause <xerofoify@...il.com>,
"dledford@...hat.com" <dledford@...hat.com>
CC: "hal.rosenstock@...il.com" <hal.rosenstock@...il.com>,
"Weiny, Ira" <ira.weiny@...el.com>,
"jgunthorpe@...idianresearch.com" <jgunthorpe@...idianresearch.com>,
"yun.wang@...fitbricks.com" <yun.wang@...fitbricks.com>,
"Matt@...lanox.com" <Matt@...lanox.com>,
"swise@...ngridcomputing.com" <swise@...ngridcomputing.com>,
"sagig@...lanox.com" <sagig@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] infiniband:core:Fix mutex locking to lock before
unlocking in the function cma_ib_mc_handler
> This fixes mutex locking to lock before unlocking in the function
> cma_ib_mc_handler for the mutex handler_mutex as part of the pointer
> id_priv before 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 function cma_ib_mc_handler.
The call cma_disable_callback() acquires the mutex.
> ---
> drivers/infiniband/core/cma.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 143ded2..7b89195 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -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.
> ret = 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists