Loading
qcacmn: Avoid ser timeout and actual command removal race
In case the serialization command timeout happens, it queues a msg with in schedular thread to process timeout and pass the active timer as its context, but if before the timeout process is executed the actual command completion can remove the command from serialization and it will update the timer data to point to the newly activated command. Now when the timer msg is executed the timer is pointing to the newly activated command instead of actual command which was timed out and thus remove the new command instead of the original command. This leads to an issue where the new active command removal is a failure when its process is completed and thus action remains incomplete. This can also lead to two commands getting processed at the same time as the new command was forcefully removed. To fix this instead of passing the timer context pass the copied command in msg to scheduler thread and do not delete the command from serialization if the command is not active. Change-Id: I14b489172d0f22a9ed3b26b9c94226a4095f1dee CRs-Fixed: 2950525