Skip to contentSkip to conversation

RDMA/core: Annotate CMA unlock helper routine

PATCH Applied Leon Romanovsky 2 participants 2 messages Jun 11, 2020 – Jun 18, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/core: Annotate CMA unlock helper routine

From: Leon Romanovsky <[email protected]>

Fix the following sparse error by adding annotation
to cm_queue_work_unlock() that it releases cm_id_priv->lock lock.

drivers/infiniband/core/cm.c:936:24: warning: context imbalance in 'cm_queue_work_unlock' - unexpected unlock

Fixes e83f195aa45c ("RDMA/cm: Pull duplicated code into cm_queue_work_unlock()")
---
 drivers/infiniband/core/cm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/core/cm.c +1 -0
index 9ce787e37e22..0d1377232933 100644
@@ -918,6 +918,7 @@ static void cm_free_work(struct cm_work *work)
 
 static void cm_queue_work_unlock(struct cm_id_private *cm_id_priv,
 				 struct cm_work *work)
+	__releases(&cm_id_priv->lock)
 {
 	bool immediate;
 

--
2.26.2

#1 lore raw
Quoted 8 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

Fix the following sparse error by adding annotation
to cm_queue_work_unlock() that it releases cm_id_priv->lock lock.

drivers/infiniband/core/cm.c:936:24: warning: context imbalance in 'cm_queue_work_unlock' - unexpected unlock

Quoted 6 lines
Fixes e83f195aa45c ("RDMA/cm: Pull duplicated code into cm_queue_work_unlock()")
---
 drivers/infiniband/core/cm.c | 1 +
 1 file changed, 1 insertion(+)

Applied to for-rc

Thanks,
Jason