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

Skip to content
Commit 5c134be0 authored by Liangwei Dong's avatar Liangwei Dong Committed by nshrivas
Browse files

qcacmn: Clear lock->lock.dev to NULL after wake lock destroyed

In kernel 5.4, Wake lock API wakeup_source_register requires
"struct device *" parameter, and it can be NULL value. If it is
NULL, the wakeup_source_register will create a "device" node and return
it by wakeup_source struct.
In qcacld driver, the qdf_wake_lock_create will save the "wakeup_source"
to cld's private struct qdf_wake_lock->lock.
When the cld driver destroy os wake lock by wakeup_source_unregister,
"dev" will also be invalid in kernel, we need to clear the "dev"
field in local copy of wakeup_source in qdf_wake_lock->lock.
This will fix the potential reuse of qdf_wake_lock->lock.dev after it has
been destroyed.

Change-Id: I1de6e95c64b35929bef8be2cdeeb86422bc38515
CRs-Fixed: 2634032
parent 967cabbd
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