c176a5241bdd56175877176dbce9dca96f1e33ab

Currently bool is used to check if scan node is active or not, and if it is active the deletion can happen. Now if two thread tries to delete the same node at same time, the first one to get the node will delete the node and set the active bool to false. If the delete operation leads to node being freed, the 2nd thread when gets the lock tries to check the bool, if node is active and then return if node is not active. Now if before the 2nd thread check the bool, the memory is reallocate and the byte pointing to the bool is overwritten with non-zero value the 2nd thread will assume that node is still active and try to delete and access an already freed node. To fix this use cookie instead of bool to check if scan node is active. Change-Id: Id6b9dc9d0ff8f091eef0bd648abc9d3198c3ad4b CRs-Fixed: 2219667
This is CNSS WLAN Host Driver for products starting from iHelium
Opis
Languages
C
98.7%
C++
0.9%
Makefile
0.3%
Starlark
0.1%