Add a mutex for the ap_handle_list 31/255931/1 accepted/tizen/unified/20210329.145051 submit/tizen/20210325.101906
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 25 Mar 2021 05:47:17 +0000 (14:47 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 25 Mar 2021 05:59:44 +0000 (14:59 +0900)
commiteabcd7289d3bc8df8374bd0445f31482edf15008
tree19a44ac661e17f622ec9426aeb791520dd62c263
parent71adddbfc51c85a8f84790987155fee5c7ddd73b
Add a mutex for the ap_handle_list

In CLR environment, GC can release an ap handle in non-main thread.
The problem is that add() operation for an ap handle can arise during GC
working in main or other thread. In this case, the ap_handle_list is accessed
at the same time in main and non-main thread.
This can make a memory corruption of the ap_handle_list.

Change-Id: I7e6a37751e746153d2f6610fc340b44c1e498f25
include/wifi_internal.h
packaging/capi-network-wifi-manager.spec
src/wifi_internal.c