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

Commit d6a6bf27 authored by Sourav Mohapatra's avatar Sourav Mohapatra Committed by nshrivas
Browse files

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
parent 1a38330d
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