From: Johannes Berg <johannes@sipsolutions.net>
To: Zhongqiu Han <quic_zhonhan@quicinc.com>,
miriam.rachel.korenblit@intel.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+5a7b40bcb34dea5ca959@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] wifi: mac80211: Prevent disconnect reports when no AP is associated
Date: Wed, 23 Apr 2025 17:26:44 +0200 [thread overview]
Message-ID: <4ed3cfbc1a5b80bb3577f73b8c2b19ce830eeff5.camel@sipsolutions.net> (raw)
In-Reply-To: <20250314120614.4032434-1-quic_zhonhan@quicinc.com>
On Fri, 2025-03-14 at 20:06 +0800, Zhongqiu Han wrote:
>
> +++ b/net/mac80211/mlme.c
> @@ -4433,6 +4433,10 @@ static void ieee80211_report_disconnect(struct ieee80211_sub_if_data *sdata,
> .u.mlme.data = tx ? DEAUTH_TX_EVENT : DEAUTH_RX_EVENT,
> .u.mlme.reason = reason,
> };
> + struct sta_info *ap_sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> +
> + if (WARN_ON(!ap_sta))
> + return;
You're adding a WARN_ON() that's now guaranteed to trigger, no?
Shouldn't the caller (also) be fixed?
> @@ -8090,7 +8094,7 @@ static void ieee80211_sta_timer(struct timer_list *t)
> void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
> u8 reason, bool tx)
> {
> - u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
> + u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN] = {0};
>
And that's not needed then? And perhaps should be {} if it is.
johannes
next prev parent reply other threads:[~2025-04-23 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 12:06 Zhongqiu Han
2025-04-23 15:26 ` Johannes Berg [this message]
2025-04-24 8:29 ` Zhongqiu Han
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=4ed3cfbc1a5b80bb3577f73b8c2b19ce830eeff5.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=quic_zhonhan@quicinc.com \
--cc=syzbot+5a7b40bcb34dea5ca959@syzkaller.appspotmail.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
all inboxes | Powered by JetHome®