android_kernel_xiaomi_sm8350/components/dsc/test
Sourav Mohapatra b273c0fa3a qcacld-3.0: Reject down the tree transitions instead of waiting
The driver currently waits for driver transitions (loading/unloading)
to complete before allowing a psoc or vdev level transition/operation.
This can lead to race conditions if the driver acquires rtnl lock as a part
of the operation and simultaneously a driver transition is invoked.

One such scenario occurs if delete virtual interface is invoked in parallel
to rmmod. The timing of the calls can be such that the delete interface is
waiting on DSC queue to complete after rmmod while the rmmod is waiting on
the rtnl lock to be freed by the delete interface resulting in a scenario
where the threads are waiting on the other to complete.

* Thread B - Invokes rmmod and context switch happens before rtnl lock is
             taken

* Thread A - Takes rtnl lock and invokes iw dev wlan0 del
	   - Context switch after entering wlan_hdd_del_virtual_intf
	     before osif_vdev_sync_trans_start_wait

* Thread B - Waits for rtnl lock to be released by Thread A

* Thread A - Waits for driver transition to be completed by Thread B

To avoid this possible scenario, modify the infrastructure such that any
down the tree transitions/operations are rejected if a driver transition
is taking place instead of waiting. Also, modify the corresponding tests
in the DSC unit test framework to correctly verify the changes made.

Change-Id: I61715c8fc2df33fd2deb46389da0375e4df5080c
CRs-Fixed: 2475386
2019-08-08 08:40:17 -07:00
..
wlan_dsc_test.c qcacld-3.0: Reject down the tree transitions instead of waiting 2019-08-08 08:40:17 -07:00
wlan_dsc_test.h qcacld-3.0: Add Driver Synchronization Core (common) 2018-08-06 19:02:53 -07:00