Skip to contentSkip to conversation

RDMA/cxgb4: release mutex on error in c4iw_reject_cr()

PATCH New Dan Carpenter 1 participant 1 message Apr 2, 2014 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 RDMA/cxgb4: release mutex on error in c4iw_reject_cr()

We recently added some locking to this function and there was an error path which missed the unlock.

Fixes 9306dcbc96f3 ('RDMA/cxgb4: Lock around accept/reject downcalls')
drivers/infiniband/hw/cxgb4/cm.c +1 -0
index 303e29c..f3753a1 100644
@@ -2524,6 +2524,7 @@ int c4iw_reject_cr(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
 
 	mutex_lock(&ep->com.mutex);
 	if (ep->com.state = DEAD) {
+		mutex_unlock(&ep->com.mutex);
 		c4iw_put_ep(&ep->com);
 		return -ECONNRESET;
 	}