qcacld-3.0: Relocate fetching of hdd_ctx to avoid stale pointer
In the function hdd_driver_unload, the hdd_ctx is fetched at the beginning before the dsc_wait_for_trans. In the scenario where this wait_for_trans is active and in the other thread (for example when wlan_pld_remove and rmmod run in parallel) the hdd_ctx is invalidated, the local copy of the pointer becomes stale. Accessing this stale pointer leads to page fault. Do not fetch the hdd_ctx before waiting for dsc trans. Rather fetch it just before where it is actually used. Change-Id: Ia5524c7a2af8ff2e976a6f1d3e87f2f374fdc371 CRs-Fixed: 2720714
Loading
Please register or sign in to comment