mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacmn: Update queue size from pending queue after command activation
As part of activaiton of serialization command from pending to active queue, the lock is released. In the activation API, the same API to move non scan cmds from pending to active queue can be called if activation fails. This reentrant API may modify the pending queue even before the control is given back to the caller API leading to random behavior when accesing the next cmd from pending queue via local variables. Add fix to update queue size from pending queue after command activation Change-Id: I8082e2a9dd3410369967ab20196853ddfa0639a7 CRs-Fixed: 2801956
This commit is contained in:
parent
1c0e26420a
commit
ca2afe2898
1 changed files with 15 additions and 6 deletions
|
|
@ -339,9 +339,11 @@ wlan_ser_move_non_scan_pending_to_active(
|
|||
&next_cmd_list->cmd_in_use);
|
||||
}
|
||||
|
||||
if (vdev_cmd_active)
|
||||
if (vdev_cmd_active) {
|
||||
qdf_atomic_clear_bit(CMD_MARKED_FOR_MOVEMENT,
|
||||
&pending_cmd_list->cmd_in_use);
|
||||
continue;
|
||||
|
||||
}
|
||||
} else {
|
||||
if (vdev_cmd_active)
|
||||
break;
|
||||
|
|
@ -417,12 +419,19 @@ wlan_ser_move_non_scan_pending_to_active(
|
|||
if (vdev_queue_lookup || pdev_queue->blocking_cmd_active)
|
||||
break;
|
||||
|
||||
if (next_cmd_list) {
|
||||
qdf_atomic_clear_bit(CMD_MARKED_FOR_MOVEMENT,
|
||||
&next_cmd_list->cmd_in_use);
|
||||
qsize = wlan_serialization_list_size(pending_queue);
|
||||
if (!qsize) {
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
goto error;
|
||||
}
|
||||
|
||||
next_cmd_list = NULL;
|
||||
qdf_status = wlan_serialization_peek_front(pending_queue,
|
||||
&pending_node);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||
ser_err("can't peek cmd");
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue