mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Chen <chunfan.chen@gmail.com>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next 3/3] wifi: nxpwifi: zero the channel statistics array
Date: Tue, 8 Sep 2026 18:31:27 +0800	[thread overview]
Message-ID: <ap/j/0/eVoq3E1nl@nxpwireless-Inspiron-14-Plus-7440> (raw)
In-Reply-To: <20260813082315.1390321-4-lilinmao@kylinos.cn>

On Thu, Aug 13, 2026 at 04:23:15 PM +0800, Linmao Li wrote:
> adapter->chan_stats comes from vmalloc(), which does not clear the
> memory, and nxpwifi_cfg80211_dump_survey() reads it as soon as user
> space asks for survey data.  For the entries no scan has filled in, a
> non-zero cca_scan_dur passes the validity check and stale bytes are
> reported to user space as noise, time and time_busy.
> 
> Use kcalloc() instead.  The array holds two entries per supported
> channel, small enough not to need vmalloc(), and the two callers change
> to kfree() accordingly.
 
Reviewed-by: Jeff Chen <jeff.chen_1@nxp.com>

      reply	other threads:[~2026-09-08 10:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  8:23 [PATCH wireless-next 0/3] wifi: nxpwifi: three fixes mwifiex already made Linmao Li
2026-08-13  8:23 ` [PATCH wireless-next 1/3] wifi: nxpwifi: wait for the wakeup timer before the adapter is freed Linmao Li
2026-09-01 10:13   ` Jeff Chen
2026-08-13  8:23 ` [PATCH wireless-next 2/3] wifi: nxpwifi: free the aggregation buffer when the RA list disappears Linmao Li
2026-09-08 10:21   ` Jeff Chen
2026-08-13  8:23 ` [PATCH wireless-next 3/3] wifi: nxpwifi: zero the channel statistics array Linmao Li
2026-09-08 10:31   ` Jeff Chen [this message]

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=ap/j/0/eVoq3E1nl@nxpwireless-Inspiron-14-Plus-7440 \
    --to=chunfan.chen@gmail.com \
    --cc=francesco@dolcini.it \
    --cc=johannes@sipsolutions.net \
    --cc=lilinmao@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®