Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: gregory.greenman@intel.com
Cc: linux-wireless@vger.kernel.org,
	Mukesh Sisodiya <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:07:28 +0200	[thread overview]
Message-ID: <416fc1eba88e13c245fac4499ee0af2efbd5485a.camel@sipsolutions.net> (raw)
In-Reply-To: <20230612184434.cf7a5ce82fb0.Id3c05d13eeee6638f0930f750e93fb928d5c9dee@changeid>

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

  reply	other threads:[~2023-06-14 10:08 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 [this message]
2023-06-14 12:28     ` Greenman, Gregory
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=416fc1eba88e13c245fac4499ee0af2efbd5485a.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=gregory.greenman@intel.com \
    --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