From: "Greenman, Gregory" <gregory.greenman@intel.com>
To: "johannes@sipsolutions.net" <johannes@sipsolutions.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Sisodiya, Mukesh" <mukesh.sisodiya@intel.com>
Subject: Re: [PATCH 08/15] wifi: iwlwifi: mvm: Add NULL check before dereferencing the pointer
Date: Wed, 14 Jun 2023 12:28:33 +0000 [thread overview]
Message-ID: <75ea42d01f6397f5b46842e6eccd3fced9b6e31a.camel@intel.com> (raw)
In-Reply-To: <416fc1eba88e13c245fac4499ee0af2efbd5485a.camel@sipsolutions.net>
On Wed, 2023-06-14 at 12:07 +0200, Johannes Berg wrote:
> On Mon, 2023-06-12 at 18:51 +0300, gregory.greenman@intel.com wrote:
> > From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
> >
> > The p2p, bss and ap vif pointers are assigned based on the mode.
> > All pointers will not have valid value at same time and can be
> > NULL, based on configured mode. This can lead to NULL pointer
> > access.
>
> This is not true.
>
> > /* enable PM on bss if bss stand alone */
> > - if (vifs->bss_active && !vifs->p2p_active && !vifs->ap_active) {
> > + if (bss_mvmvif && vifs->bss_active && !vifs->p2p_active &&
> > + !vifs->ap_active) {
> >
>
> The pointers can only be NULL iff *_active is false, however, it may be
> false even if the pointer is non-NULL, so it's not exactly the same.
>
> Probably a static checker thing that didn't understand it?
>
> johannes
Right, so the commit message could be rephrased like this:
"While vif pointers are protected by the corresponding "*active" fields,
static checkers can get confused sometimes. Add an explicit check."
Do you want me to resend it with the fixed commit message?
next prev parent reply other threads:[~2023-06-14 12:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 15:51 [PATCH 00/15] wifi: iwlwifi: updates intended for v6.5 2023-06-12 gregory.greenman
2023-06-12 15:51 ` [PATCH 01/15] wifi: iwlwifi: make debugfs entries link specific gregory.greenman
2023-06-12 15:51 ` [PATCH 02/15] wifi: iwlwifi: mvm: debugfs: add entry for setting maximum TXOP time gregory.greenman
2023-06-14 10:03 ` Johannes Berg
2023-06-14 15:13 ` Greenman, Gregory
2023-06-12 15:51 ` [PATCH 03/15] wifi: iwlwifi: mvm: Handle return value for iwl_mvm_sta_init gregory.greenman
2023-06-12 15:51 ` [PATCH 04/15] wifi: iwlwifi: mvm: FTM initiator MLO support gregory.greenman
2023-06-12 15:51 ` [PATCH 05/15] wifi: iwlwifi: update response for mcc_update command gregory.greenman
2023-06-12 15:51 ` [PATCH 06/15] wifi: iwlwifi: bump FW API to 79 for AX devices gregory.greenman
2023-06-12 15:51 ` [PATCH 07/15] wifi: iwlwifi: mvm: fix getting LDPC/STBC support gregory.greenman
2023-06-12 15:51 ` [PATCH 08/15] wifi: iwlwifi: mvm: Add NULL check before dereferencing the pointer gregory.greenman
2023-06-14 10:07 ` Johannes Berg
2023-06-14 12:28 ` Greenman, Gregory [this message]
2023-06-14 12:32 ` Johannes Berg
2023-06-12 15:51 ` [PATCH 09/15] wifi: iwlwifi: unify checks for HW error values gregory.greenman
2023-06-12 15:51 ` [PATCH 10/15] wifi: iwlwifi: fw: print PC register value instead of address gregory.greenman
2023-06-12 15:51 ` [PATCH 11/15] wifi: iwlwifi: mvm: always set MH len in offload_assist gregory.greenman
2023-06-12 15:51 ` [PATCH 12/15] wifi: iwlwifi: debugfs: add ppag capa to fw info file gregory.greenman
2023-06-12 15:51 ` [PATCH 13/15] wifi: iwlwifi: pass ESR parameters to the firmware gregory.greenman
2023-06-12 15:51 ` [PATCH 14/15] wifi: iwlwifi: mvm: FTM responder MLO support gregory.greenman
2023-06-12 15:51 ` [PATCH 15/15] wifi: iwlwifi: mvm: Propagate ERP slot changes to FW gregory.greenman
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=75ea42d01f6397f5b46842e6eccd3fced9b6e31a.camel@intel.com \
--to=gregory.greenman@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mukesh.sisodiya@intel.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