From: Dan Carpenter <error27@gmail.com>
To: quic_kvalo@quicinc.com
Cc: ath12k@lists.infradead.org
Subject: [bug report] wifi: ath12k: counter leaks
Date: Thu, 16 Feb 2023 17:00:02 +0300 [thread overview]
Message-ID: <Y+424ql0+1A6MMHG@kili> (raw)
Hello Kalle Valo,
The patch d889913205cf: "wifi: ath12k: driver for Qualcomm Wi-Fi 7
devices" from Nov 28, 2022, leads to the following Smatch static
checker warning:
drivers/net/wireless/ath/ath12k/mac.c:1031 ath12k_mac_monitor_start() warn: plus plus leak 'ar->num_started_vdevs'
drivers/net/wireless/ath/ath12k/mac.c:3173 ath12k_station_assoc() warn: plus plus leak 'arvif->num_legacy_stations'
drivers/net/wireless/ath/ath12k/mac.c:5087 ath12k_mac_op_add_interface() warn: plus plus leak 'ar->num_created_vdevs'
drivers/net/wireless/ath/ath12k/mac.c
1003 static int ath12k_mac_monitor_start(struct ath12k *ar)
1004 {
1005 struct cfg80211_chan_def *chandef = NULL;
1006 int ret;
1007
1008 lockdep_assert_held(&ar->conf_mutex);
1009
1010 if (ar->monitor_started)
1011 return 0;
1012
1013 ieee80211_iter_chan_contexts_atomic(ar->hw,
1014 ath12k_mac_get_any_chandef_iter,
1015 &chandef);
1016 if (!chandef)
1017 return 0;
1018
1019 ret = ath12k_mac_monitor_vdev_start(ar, ar->monitor_vdev_id, chandef);
1020 if (ret) {
1021 ath12k_warn(ar->ab, "failed to start monitor vdev: %d\n", ret);
1022 ath12k_mac_monitor_vdev_delete(ar);
1023 return ret;
1024 }
1025
1026 ar->monitor_started = true;
1027 ar->num_started_vdevs++;
1028 ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
If ath12k_dp_tx_htt_monitor_mode_ring_config() fails then this should
decrement ar->num_started_vdevs and set ->started = false
1029 ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac monitor started ret %d\n", ret);
1030
--> 1031 return ret;
1032 }
regards,
dan carpenter
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
reply other threads:[~2023-02-16 14:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Y+424ql0+1A6MMHG@kili \
--to=error27@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=quic_kvalo@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