public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: Zilin Guan <zilin@seu.edu.cn>
Cc: jianhao.xu@seu.edu.cn, johannes.berg@intel.com,
	johannes@sipsolutions.net, linux-kernel@vger.kernel.org,
	linux-wireless@vger.kernel.org, quic_rdevanat@quicinc.com
Subject: Re: [PATCH v2] wifi: p54: Fix memory leak in p54_beacon_update()
Date: Thu, 22 Jan 2026 09:14:50 +0100	[thread overview]
Message-ID: <819fc850-98b4-4a0c-af4d-da2cf41cfcbd@gmail.com> (raw)
In-Reply-To: <20260121090507.3442567-1-zilin@seu.edu.cn>

Hi Zilin,

On 1/21/26 10:05 AM, Zilin Guan wrote:
> On Tue, Jan 20, 2026 at 09:25:15PM +0100, Christian Lamparter wrote:
>> Ok, from what I remember, this return basically is/was and likely will be a dead-code path.
>> So adding something there is only there to "look" good for the static analysis tools.
>> But many commits like these have been merged before. As long as it is mentioned that
>> static analysis was the reason for this. Yeah sure why not.
>>
>>
>> Reason being why this is dead-code is that in order for the path to trigger, mac80211's
>> ieee80211_beacon_get must have prepared an invalid beacon (with an invalid TIM Element)
>> to start with... And looking at ieee80211_beacon_add_tim_pvb, it still looks to me like
>> the IE length can't be less than 3 ever. But, I've been wrong before, if you do see please
>> correct me. (If not, you don't neet to really bother with the Fixes-Tag)
> 
> I agree with your analysis. I checked the code and confirmed that mac80211
> guarantees a minimum TIM length of 4 bytes for non-S1G devices.
> 
> I appreciate you accepting this patch to silence the static analysis warning.

Phew, and so far no buildbot replied with comments.

I have one last request: Can you please add a sentence about that analysis into the commit log as well?
Our future selves could maybe appreciate that one day, if this comes up again. Because then we won't have
to remember all or search/look for it again, if it's already neatly written down directly there.

Thank you,
Christian

  reply	other threads:[~2026-01-22  8:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 13:01 [PATCH v2] wifi: p54: Fix memory leak in p54_beacon_update() Zilin Guan
2026-01-20 20:25 ` Christian Lamparter
2026-01-21  9:05   ` Zilin Guan
2026-01-22  8:14     ` Christian Lamparter [this message]
2026-01-22  8:34       ` Zilin Guan

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=819fc850-98b4-4a0c-af4d-da2cf41cfcbd@gmail.com \
    --to=chunkeey@gmail.com \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_rdevanat@quicinc.com \
    --cc=zilin@seu.edu.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