public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mac80211: debugfs: bound queue state formatting to PAGE_SIZE
Date: Fri, 17 Apr 2026 09:56:09 +0200	[thread overview]
Message-ID: <f0fe4e35db01e4718e1bc5b62f161e1a2c46cb73.camel@sipsolutions.net> (raw)
In-Reply-To: <20260417074604.18976-1-pengpeng@iscas.ac.cn>

On Fri, 2026-04-17 at 15:46 +0800, Pengpeng Hou wrote:
> queues_read() formats all queue state lines into a fixed stack buffer
> that budgets only 20 bytes per queue and appends each line with
> sprintf().
> 
> The queue-stop reason bitmap is printed with %#.8lx, whose width is not
> capped on 64-bit builds, and the pending queue length field can add more
> digits still. The cumulative output can therefore run past the end of
> the fixed stack buffer.

I'd agree the code isn't optimal, but this simply isn't true.

> Format the output into a PAGE_SIZE heap buffer with scnprintf() and stop
> once the debugfs read buffer is full.

And the fix is just strange.

> Fixes: db2e6bd4e966 ("mac80211: add queue debugfs file")
> 
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>

There also should be no blank line there.

johannes

      reply	other threads:[~2026-04-17  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17  7:46 [PATCH] mac80211: debugfs: bound queue state formatting to PAGE_SIZE Pengpeng Hou
2026-04-17  7:56 ` Johannes Berg [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=f0fe4e35db01e4718e1bc5b62f161e1a2c46cb73.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    /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