From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kalle Valo <kvalo@kernel.org>
Cc: kbuild@lists.01.org, Wen Gong <quic_wgong@quicinc.com>,
lkp@intel.com, kbuild-all@lists.01.org,
ath11k@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [kvalo-ath:pending 52/56] drivers/net/wireless/ath/ath11k/wmi.c:5651 ath11k_wmi_tlv_fw_stats_data_parse() error: uninitialized symbol 'len'.
Date: Tue, 11 Jan 2022 16:58:05 +0300 [thread overview]
Message-ID: <20220111135805.GL1978@kadam> (raw)
In-Reply-To: <87czkyv1i9.fsf@kernel.org>
On Tue, Jan 11, 2022 at 03:35:26PM +0200, Kalle Valo wrote:
> > bc5c448b70ff14 Wen Gong 2021-12-08 5629 static int
> > ath11k_wmi_tlv_fw_stats_data_parse(struct ath11k_base *ab,
> > bc5c448b70ff14 Wen Gong 2021-12-08 5630 struct wmi_tlv_fw_stats_parse
> > *parse,
> > bc5c448b70ff14 Wen Gong 2021-12-08 5631 const void *ptr)
> > bc5c448b70ff14 Wen Gong 2021-12-08 5632 {
> > bc5c448b70ff14 Wen Gong 2021-12-08 5633 struct ath11k_fw_stats *stats
> > = parse->stats;
> > bc5c448b70ff14 Wen Gong 2021-12-08 5634 const struct wmi_stats_event
> > *ev = parse->ev;
> > bc5c448b70ff14 Wen Gong 2021-12-08 5635 int i;
> > bc5c448b70ff14 Wen Gong 2021-12-08 5636 const void *data = ptr;
> > bc5c448b70ff14 Wen Gong 2021-12-08 5637 u32 len;
^^^^^^^^
"len" is a local variable, not a parameter.
> > bc5c448b70ff14 Wen Gong 2021-12-08 5638
> > bc5c448b70ff14 Wen Gong 2021-12-08 5639 if (!ev) {
> > bc5c448b70ff14 Wen Gong 2021-12-08 5640 ath11k_warn(ab, "failed to
> > fetch update stats ev");
> > bc5c448b70ff14 Wen Gong 2021-12-08 5641 return -EPROTO;
> > bc5c448b70ff14 Wen Gong 2021-12-08 5642 }
> > d5c65159f28953 Kalle Valo 2019-11-23 5643
> > d5c65159f28953 Kalle Valo 2019-11-23 5644 stats->stats_id = 0;
> > d5c65159f28953 Kalle Valo 2019-11-23 5645
> > d5c65159f28953 Kalle Valo 2019-11-23 5646 for (i = 0; i <
> > ev->num_pdev_stats; i++) {
> > d5c65159f28953 Kalle Valo 2019-11-23 5647 const struct wmi_pdev_stats
> > *src;
> > d5c65159f28953 Kalle Valo 2019-11-23 5648 struct ath11k_fw_stats_pdev
> > *dst;
> > d5c65159f28953 Kalle Valo 2019-11-23 5649
> > d5c65159f28953 Kalle Valo 2019-11-23 5650 src = data;
> > bc5c448b70ff14 Wen Gong 2021-12-08 @5651 if (len < sizeof(*src))
> >
> > "len" is never initialized.
>
> I only quickly looked at this, but AFAICS ath11k_wmi_tlv_iter() provides
> len to ath11k_wmi_tlv_fw_stats_parse() which again provides len to
> ath11k_wmi_tlv_fw_stats_data_parse(). I'm not seeing how this is
> uninitalised, did I miss something?
I think the bug was fixed and the tree was rebased? I only look at the
email and hit forward and the code in the email was clearly buggy but
tree looks okay now as you say.
regards,
dan carpenter
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2022-01-11 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202112110427.o6xDAKfE-lkp@intel.com>
2022-01-11 13:35 ` [kvalo-ath:pending 52/56] drivers/net/wireless/ath/ath11k/wmi.c:5651 ath11k_wmi_tlv_fw_stats_data_parse() error: uninitialized symbol 'len' Kalle Valo
2022-01-11 13:58 ` Dan Carpenter [this message]
2022-01-11 14:26 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220111135805.GL1978@kadam \
--to=dan.carpenter@oracle.com \
--cc=ath11k@lists.infradead.org \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=quic_wgong@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox