All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH qca6390-bringup] ath11k: fix KASAN warning of ath11k_qmi_wlanfw_wlan_cfg_send
@ 2019-12-20  8:29 Carl Huang
  0 siblings, 0 replies; only message in thread
From: Carl Huang @ 2019-12-20  8:29 UTC (permalink / raw)
  To: ath11k

It's caused by reading memory out of boundary from target_ce_config_wlan.
There is no need to read the last array element even for AHB interface, so
fix it by not reading the last array element.

Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 44060b2..d0d283b 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2217,7 +2217,7 @@ static int ath11k_qmi_wlanfw_wlan_cfg_send(struct ath11k_base *ab)
 	req->tgt_cfg_valid = 1;
 	/* This is number of CE configs */
 	req->tgt_cfg_len = ab->qmi.ce_cfg.tgt_ce_len;
-	for (pipe_num = 0; pipe_num <= req->tgt_cfg_len ; pipe_num++) {
+	for (pipe_num = 0; pipe_num < req->tgt_cfg_len ; pipe_num++) {
 		req->tgt_cfg[pipe_num].pipe_num = ce_cfg[pipe_num].pipenum;
 		req->tgt_cfg[pipe_num].pipe_dir = ce_cfg[pipe_num].pipedir;
 		req->tgt_cfg[pipe_num].nentries = ce_cfg[pipe_num].nentries;
-- 
2.7.4

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-20  8:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-20  8:29 [PATCH qca6390-bringup] ath11k: fix KASAN warning of ath11k_qmi_wlanfw_wlan_cfg_send Carl Huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.