Kernel Tree For Xiaomi 11 Lite NE 5G
Go to file
Nitesh Shah 6bc3f98983 qcacmn: Avoid race condition while modifying connection list
In case of STA-AP case, new thread is created to call the func
policy_mgr_check_sta_ap_concurrent_ch_intf() that calls
policy_mgr_get_pcl_for_existing_conn() that modifies
pm_conc_connection_list table. The mc_thread calls
policy_mgr_get_valid_chan_weights() that also modifies
pm_conc_connection_list table. But the race condition is
created that mess up the pm_conc_connection_list table.

This race condition also leads to the scenario where the STA
connection to the AP is not updated properly . This shall lead
to the improper PCL update for a STA+SAP concurrency and thus
the channel switch fails.

The fix is to protect the whole sequence of the function
policy_mgr_check_sta_ap_concurrent_ch_intf() with mutex to avoid
race condition.

Change-Id: Ibb6d804afa70ef45d99e7ec9fc7fecc4993c7621
CRs-Fixed: 2047765
2017-05-26 19:20:46 -07:00
inc qcacmn: Handle multiple H/w DBS modes 2017-05-26 06:20:28 -07:00
src qcacmn: Avoid race condition while modifying connection list 2017-05-26 19:20:46 -07:00