From: Johannes Berg <johannes@sipsolutions.net>
To: Jia-Ju Bai <baijiaju@buaa.edu.cn>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, simon.horman@corigine.com
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] net: mac80211: Add NULL checks for sta->sdata
Date: Tue, 11 Apr 2023 12:35:16 +0200 [thread overview]
Message-ID: <0e155b9612bef2c102a4ef5002c25a7ce5a2435e.camel@sipsolutions.net> (raw)
In-Reply-To: <20230404124734.201011-1-baijiaju@buaa.edu.cn>
On Tue, 2023-04-04 at 20:47 +0800, Jia-Ju Bai wrote:
> In a previous commit 69403bad97aa ("wifi: mac80211: sdata can be NULL
> during AMPDU start"), sta->sdata can be NULL, and thus it should be
> checked before being used.
Right.
> However, in the same call stack, sta->sdata is also used in the
> following functions:
>
Fun, guess we should fix that too then.
Honestly though, I don't think this patch is the right way of going
about it. It seems that instead we should expand the checks in the
previous patch - see how it's talking about a race, and we don't really
want or need to handle aggregation for a station that's being removed.
So I think the better way to fix it would be to prevent the race more
clearly, though off the top of my head I'm not sure how we'd do that.
johannes
prev parent reply other threads:[~2023-04-11 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 12:47 [PATCH v3] net: mac80211: Add NULL checks for sta->sdata Jia-Ju Bai
2023-04-07 16:12 ` Simon Horman
2023-04-11 10:35 ` 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=0e155b9612bef2c102a4ef5002c25a7ce5a2435e.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=baijiaju@buaa.edu.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.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