iw_cxgbe: Plug a lock leak in process_mpa_request().
If the parent is DEAD or connect_request_upcall() fails, the parent mutex is left locked. This leads to a hang when process_mpa_request() is called again for another child of the listening endpoint. Submitted by: Krishnamraju Eraparaju @ Chelsio Obtained from: upstream iw_cxgb4 Sponsored by: Chelsio Communications
This commit is contained in:
parent
ce00342bb2
commit
fc511a3302
@ -1861,14 +1861,16 @@ process_mpa_request(struct c4iw_ep *ep)
|
||||
/* drive upcall */
|
||||
mutex_lock(&ep->parent_ep->com.mutex);
|
||||
if (ep->parent_ep->com.state != DEAD) {
|
||||
if(connect_request_upcall(ep))
|
||||
goto err_out;
|
||||
}else {
|
||||
goto err_out;
|
||||
}
|
||||
if (connect_request_upcall(ep))
|
||||
goto err_unlock_parent;
|
||||
} else
|
||||
goto err_unlock_parent;
|
||||
mutex_unlock(&ep->parent_ep->com.mutex);
|
||||
return 0;
|
||||
|
||||
err_unlock_parent:
|
||||
mutex_unlock(&ep->parent_ep->com.mutex);
|
||||
goto err_out;
|
||||
err_stop_timer:
|
||||
STOP_EP_TIMER(ep);
|
||||
err_out:
|
||||
|
Loading…
Reference in New Issue
Block a user