qcacld-3.0: Free vdev from objmgr if vdev_create fails
When vdev create happens, objmgr creates vdev and stores vdev_id into adapter, vdev_create message is posted to scheduler thread and driver wait for the session_open_event to be completed. Before this event completes if SSR occures, session open event is forcefully set which leads to the failure of vdev create. In current implementation in case of force event set, driver returns without destroying the vdev from objmgr which leads to vdev leak in stop modules. To resolve above issue, destroy vdev from objmgr in case if vdev create fails. Change-Id: Id0bbde0085d2b4d91b0590e3bb8a7798cd0ba0fa CRs-fixed: 2505590
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
efd73546c8
commit
cf3cf662ed
@@ -4549,7 +4549,8 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
||||
status = qdf_event_reset(&adapter->qdf_session_open_event);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("failed to reinit session open event");
|
||||
return -EINVAL;
|
||||
errno = qdf_status_to_os_return(status);
|
||||
goto objmgr_vdev_destroy_procedure;
|
||||
}
|
||||
errno = hdd_set_sme_session_param(adapter, &sme_session_params,
|
||||
callback, ctx);
|
||||
@@ -4569,17 +4570,14 @@ int hdd_vdev_create(struct hdd_adapter *adapter,
|
||||
status = qdf_wait_for_event_completion(&adapter->qdf_session_open_event,
|
||||
SME_CMD_VDEV_CREATE_DELETE_TIMEOUT);
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
if (adapter->qdf_session_open_event.force_set) {
|
||||
if (adapter->qdf_session_open_event.force_set)
|
||||
/*
|
||||
* SSR/PDR has caused shutdown, which has forcefully
|
||||
* set the event. Return without the closing session.
|
||||
* set the event.
|
||||
*/
|
||||
adapter->vdev_id = WLAN_UMAC_VDEV_ID_MAX;
|
||||
hdd_err("Session open event forcefully set");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (QDF_STATUS_E_TIMEOUT == status)
|
||||
else if (QDF_STATUS_E_TIMEOUT == status)
|
||||
hdd_err("Session failed to open within timeout period");
|
||||
else
|
||||
hdd_err("Failed to wait for session open event(status-%d)",
|
||||
|
Reference in New Issue
Block a user