diff options
| author | yeshwanth sriram guntuka <ysriramg@codeaurora.org> | 2016-09-28 19:33:33 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-10-20 12:03:15 +0530 |
| commit | 0aadd62c723e71438ec50222bfec1ef1a7bfe712 (patch) | |
| tree | 0b633da93c75ddd632cd25e77789c5b2a8bbb3d0 | |
| parent | 6eb7cba9c5a304f18a41312df8d75c60db2e4ae7 (diff) | |
qcacld-2.0: Fix bug to prevent memory overwrite in callback
The context memory could be overwritten in the
callback due to no spinlock protection of context
in sme_PsOffloadDisablePowerSave API.
Fix is to take the context lock and clear the magic.
Change-Id: I9823a072fbed11024126d26c4ff82bb24361e94e
CRs-Fixed: 1072148
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 5f40c7d21c1f..316e2f735463 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -4245,6 +4245,9 @@ VOS_STATUS wlan_hdd_set_powersave(hdd_adapter_t *pAdapter, int mode) "enabled in the cfg"); } } + spin_lock(&hdd_context_lock); + context.magic = 0; + spin_unlock(&hdd_context_lock); return VOS_STATUS_SUCCESS; } |
