mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Set VDEV SELF PEER and BSS peer to NULL on peer detach
Currently, On peer attach object manager set self peer and bss peer. But on peer detach it does not clear SELF PEER and BSS peer to NULL hence in race conditions other components are accessing invalid BSS peer. As a part of the fix, Set them to NULL on vdev peer detach. Change-Id: I9a2bbfed8665dcb3bf2509f124dba2a5f3de8c55 CRs-Fixed: 2007748
This commit is contained in:
parent
5a4bc9d852
commit
d10b269500
1 changed files with 25 additions and 0 deletions
|
|
@ -614,6 +614,31 @@ QDF_STATUS wlan_objmgr_vdev_peer_detach(struct wlan_objmgr_vdev *vdev,
|
|||
wlan_vdev_obj_unlock(vdev);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (wlan_peer_get_peer_type(peer) == WLAN_PEER_AP) {
|
||||
if (wlan_vdev_get_selfpeer(vdev) == peer) {
|
||||
/*
|
||||
* There might be instances where new node is created
|
||||
* before deleting existing node, in which case selfpeer
|
||||
* will be pointing to the new node. So set selfpeer to
|
||||
* NULL only if vdev->vdev_objmgr.self_peer is pointing
|
||||
* to the peer processed for deletion
|
||||
*/
|
||||
wlan_vdev_set_selfpeer(vdev, NULL);
|
||||
}
|
||||
|
||||
if (wlan_vdev_get_bsspeer(vdev) == peer) {
|
||||
/*
|
||||
* There might be instances where new node is created
|
||||
* before deleting existing node, in which case bsspeer
|
||||
* in vdev will be pointing to the new node. So set
|
||||
* bsspeer to NULL only if vdev->vdev_objmgr.bss_peer is
|
||||
* pointing to the peer processed for deletion
|
||||
*/
|
||||
wlan_vdev_set_bsspeer(vdev, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* remove peer from vdev's peer list */
|
||||
if (wlan_obj_vdev_peerlist_remove_peer(&objmgr->wlan_peer_list, peer)
|
||||
== QDF_STATUS_E_FAILURE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue