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 |
||
---|---|---|
.. | ||
wlan_dsc_test.c | ||
wlan_dsc_test.h |