Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47b07a07 authored by Sourav Mohapatra's avatar Sourav Mohapatra
Browse files

wlan: Prevent potential race condition during adapter access

Currently in the driver, there is a possiblity of a race condition
between hdd_wlan_suspend and del_virtual_interface. In hdd_wlan_suspend,
the driver iterates over all the adapters and performs designated action
for each. During the process of iteration, there is no lock to prevent
race conditions. In the scenario when a del_virtual_interface comes
while this iteration is in progress, it can happen that the adapter is
cleared in the del_virtual interface path and the same is tried to be
accessed in the hdd_wlan_suspend.

To avoid this possible scenario, lock the iteration with dev_hold which
prevents the unregistration of the netdev. Also call hdd_deinit_adapter
in the del_interface path which clears the timer that is responsible for
calling the suspend call.

Change-Id: Iebf68287c38c8babb0d91b4a11d4d01d53ae8ddc
CRs-Fixed: 2512741
parent f1df4f86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment