* [PATCH] ath11k: fix rcu lock protect in peer assoc confirmation
@ 2020-02-05 1:22 Karthikeyan Periyasamy
2020-02-11 18:31 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Periyasamy @ 2020-02-05 1:22 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Karthikeyan Periyasamy
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 <periyasa@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/wmi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index a9b301c..9cbe038d 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)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix rcu lock protect in peer assoc confirmation
2020-02-05 1:22 [PATCH] ath11k: fix rcu lock protect in peer assoc confirmation Karthikeyan Periyasamy
@ 2020-02-11 18:31 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-02-11 18:31 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath11k, linux-wireless, Karthikeyan Periyasamy
Karthikeyan Periyasamy <periyasa@codeaurora.org> wrote:
> 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 <periyasa@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
db0889aba262 ath11k: fix rcu lock protect in peer assoc confirmation
--
https://patchwork.kernel.org/patch/11365669/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-11 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-05 1:22 [PATCH] ath11k: fix rcu lock protect in peer assoc confirmation Karthikeyan Periyasamy
2020-02-11 18:31 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).