diff options
| author | Karthikeyan Periyasamy <[email protected]> | 2020-02-05 06:52:28 +0530 | 
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2020-02-11 20:31:19 +0200 | 
| commit | db0889aba2629e05e555b3e4b29d5eb0ae97efec (patch) | |
| tree | feb8209cae30baa8fcd1e40778b172f22ce914ab | |
| parent | 6a0c370259c76c439d75114def0a40ac03bcd829 (diff) | |
ath11k: fix rcu lock protect in peer assoc confirmation
ath11k_mac_get_ar_by_vdev_id() get protected under rcu lock
and unlock. peer association confirmation event get used this API
without rcu protection, so corrected it.
Signed-off-by: Karthikeyan Periyasamy <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
| -rw-r--r-- | drivers/net/wireless/ath/ath11k/wmi.c | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index a9b301ceb24b..9cbe038da1f6 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5345,15 +5345,18 @@ static void ath11k_peer_assoc_conf_event(struct ath11k_base *ab, struct sk_buff  		   "peer assoc conf ev vdev id %d macaddr %pM\n",  		   peer_assoc_conf.vdev_id, peer_assoc_conf.macaddr); +	rcu_read_lock();  	ar = ath11k_mac_get_ar_by_vdev_id(ab, peer_assoc_conf.vdev_id);  	if (!ar) {  		ath11k_warn(ab, "invalid vdev id in peer assoc conf ev %d",  			    peer_assoc_conf.vdev_id); +		rcu_read_unlock();  		return;  	}  	complete(&ar->peer_assoc_done); +	rcu_read_unlock();  }  static void ath11k_update_stats_event(struct ath11k_base *ab, struct sk_buff *skb) |